Node.JS application

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 2
Joined: 16 Aug 2013, 09:07

Node.JS application

18 Aug 2013, 09:11

Hello,
Can Helicon Zoo be used for creating Node.js application, not entire site.
Assume there is the following folders structure:

wwwroot
________index.php
________node
_____________app.js
_____________web.config
...


I want requests to http://localhost/index.php be served by PHP,
but all requests beginning with http://localhost/node/ be served by Node.js with paths relative to /node/
Node.js handler is added in wwwroot\node\web.config. Adding allowPathInfo="true" or "false" to Node.js handler doesn't change anything. Requests to http://localhost/node/users/1 are seen as '/node/users/1' in req.url instead of '/users/1' in app.js Node.js application.
Is there any way to pass relative paths to Node.js?

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Node.JS application

18 Aug 2013, 15:26

To install Node.js application into subfolder simply use Web Platform Installer Zoo -> Templates and install Node.js project template into the folder you need.

As for relative path, I guess this needs to be worked around somehow inside Node.js application, because when you request http://localhost/node/users/1 you are really requesting '/node/users/1' and this is what is passed to the application. Most application frameworks has built in tools to work with relative path, I'm sure Node.js has as well.

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 1 guest