在带有iisnode的iis上使用node.js表达 [英] use node.js express on iis with iisnode

查看:215
本文介绍了在带有iisnode的iis上使用node.js表达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个node.js express应用程序,我需要使其在我的本地IIS服务器上运行,以便我可以向其发送有效的http请求并处理响应.

I got a node.js express application and i need to make it run on my local IIS server so i can send valid http requests to it and work with the responses.

我正在使用Win 10和IIS 10.

I am using win 10 and IIS 10.

我遵循了有关使用iisnode的不同指南,以便在IIS上使用node.js应用程序.

I followed the different guides about working with iisnode in order to use node.js application on IIS.

https://github.com/tjanczuk/iisnode

我也设法运行了测试,因此iisnode已安装,有效并且可以与IIS一起使用.

I also managed to run the tests, so the iisnode is installed, valid and is working together with my IIS.

内置"测试是在IIS附带的默认网站上执行的,它在该网站下创建了一个新应用程序,可以从该应用程序正常访问不同的示例.

The "built-in" test is being executed under the default web site which comes with IIS, it creates a new application under it from which there is a working access to the different examples.

我的问题是我仍然缺少一些有关如何在IIS上设置自己的node.js应用程序的信息,因为似乎缺少这些信息. 稍后介绍如何解决无效的http请求问题.

My problem is that i am still lacking some information about how to setup my own node.js app on IIS since this information seems to be lacking. And later on how to overcome issues with invalid http requests.

HTTP status: 500
HTTP subStatus: 1001
HTTP reason: Internal Server Error

推荐答案

我建议您遵循下一个指南,

I would advice to follow the next guide,

https://harveywilliams.net/blog/installing-iisnode

结合iisnode的官方github页面, 它包含有关使用IIS上的iisnode从头开始制作一个简单的express node.js应用程序的所有详细信息.

combined with the official github page of iisnode, it has all the details about making a simple express node.js app working from scratch with iisnode on IIS.

我建议先进行每个部分的测试,然后再进行下一步测试,一旦测试完成,首先要从您自己的一个简单而简单的应用程序开始,一旦一切正常,请从那里开始进行构建.

I would advice to test each part before moving on to the next and once done testing to start first from a minimalistic and simple app of your own and once everything is working build it up from there.

P.S.当我使用express.routing

P.S. The reason for this error for me was bad naming when i used express.routing

这篇关于在带有iisnode的iis上使用node.js表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆