Node.JS application
2 posts
• Page 1 of 1
Node.JS application
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?
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?
Re: Node.JS application
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.
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.
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests