Apache SSI包含和节点

时间:2017-03-14 01:45:04

标签: node.js apache ssi

我运行apache并配置为一些SSI包含服务,如果应用程序是通过Apache部署的,它一切正常,但我想部署一个节点测试服务器,同时Apache也要了解SSI包括。这甚至可能吗?

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

1 个答案:

答案 0 :(得分:0)

我最终使用了node-request

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. 
});