Calling localhost urls on Azure's IISNode

后端 未结 2 892
南方客
南方客 2021-01-21 19:25

I am running into some issues with running a Node app on Azure WebSites due to IISNode. Basically the issue is that I am relying on the port number being a number, which frankly

2条回答
  •  情话喂你
    2021-01-21 19:57

    I posted another question that was related to this problem, and I found a decent programmatic solution that applies to this problem.

    Turns out it is possible to call express.Router directly by using the (non-public/unofficial) Router#handle method with a stubbed out request and response object. For details on that approach you can refer to this answer.

    It turned out that the named pipe approach was non-viable, so calling the Router directly seems like the closest fit for the problem at hand.

提交回复
热议问题