【问题标题】:Apache SSI includes and nodeApache SSI 包括和节点
【发布时间】:2017-03-14 01:45:03
【问题描述】:

我正在运行 apache,它被配置为提供一些 SSI 包括,如果应用程序通过 Apache 部署,一切正常,但是我想部署一个节点测试服务器,同时 Apache 了解 SSI 包括.这可能吗?

我通过将 SSI 包含作为 JSON 对象加载到前端来解决此问题,但希望 SSI 包含在服务器级别进行处理。

【问题讨论】:

  • 我和npmjs.com/package/node-ssi的结果好坏参半
  • 我看到了那个插件但没看懂。该软件包是否转换 Apache 包含并遵守这些规则?还是我必须复制 Apache 中发生的事情,但在节点中发生的事情?

标签: node.js apache ssi


【解决方案1】:

我最终使用了节点请求

https://www.npmjs.com/package/request

var request = require('request');
request('http://www.google.com', function (error, response, body) {
  console.log('error:', error); // Print the error if one occurred 
  console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received 
  console.log('body:', body); // Print the HTML for the Google homepage. 
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-17
    • 2012-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多