Can an iisnode-hosted web application work out the virtual path at which it is hosted?

后端 未结 4 1912
后悔当初
后悔当初 2021-01-12 18:46

I am using iisnode to host a node web application in IIS on Windows. When I set up my routes on the web server (say Express or Restify) I want do do it in a way that is inde

4条回答
  •  Happy的楠姐
    2021-01-12 19:21

    I am not aware of a way to avoid seeing the path segment corresponding to the virtual directory within your node.js application hosted in iisnode. The best way to ensure your application code is host agnostic is to host it at the root of an IIS web site.

提交回复
热议问题