Apache SSI包括和节点

问题描述:

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

我有一个工作,通过加载SSI包括作为JSON对象的前端,但希望SSI包括在服务器级别处理。

+0

我已经混有https://www.npmjs.com/package/node-ssi –

+0

结果我看到了插件,但不明白它。该包是否转换Apache包含并遵守这些规则?或者我将不得不复制在Apache中发生的事情,但在节点中? –

我结束了使用节点请求

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