简体   繁体   English

Apache SSI包含和节点

[英]Apache SSI includes and node

I have apache running and it is configured to serve some SSI includes, it all works fine if the application is deployed through Apache, however I would like to deploy a node test server and at the same time Apache to understand the SSI includes. 我正在运行apache,并且将其配置为服务于某些SSI包含,如果通过Apache部署应用程序,则一切正常,但是我想部署节点测试服务器,同时Apache希望了解SSI包含。 Is that even possible? 那有可能吗?

I have a work around by loading the SSI includes as an JSON object on the front end but would like the SSI includes to be processed at the server level. 我通过在前端加载SSI包含作为JSON对象来解决问题,但是希望在服务器级别处理SSI包含。

I ended up using node-request 我最终使用了节点请求

https://www.npmjs.com/package/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. 
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM