I have a simple node.js application that has two endpoints
app.use('/', routes);
app.use('/users' , users);
which I can access on the following urls: http://localhost:1234/ and http://localhost:1234/users
Now I create an IIS Application under the Default Web Site, pointed it to the nodejs application physical path and gives it an alias of "NodeApplication".
So the problem is that, right now my node.js routes definition must include the "NodeApplication" prefix, like this:
app.use('/NodeApplication', routes);
app.use('/NodeApplication/users' , users);
My goal is to keep the first definition of routes in node.js application without any prefix and the IIS must redirect to the corresponding route.
For example: this url http://localhost/NodeApplication/users must triggers this route app.use('/users', routes);
Can anyone help me with this ?