Am very new to node js and socket.io. I am using socket.io for a windows azure project. I have created an App.js which starts the socket.io server, but i dont know how to programatically run that script. I am able to run that script from command prompt like "node app.js" and the socket.io server starts and the client app is able to interact with socket.io server well.
I can also go to 127.0.0.1/App.js and the socket.io server starts.
But I want the script to automatically run as soon as i start the project in my VS. Any idea on how i can do that?
EDIT:
Turned out iisnode can handle everything , i just had to put a rewrite code in web.config. From a sample azure node js application from here http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/ i got this rewrite code
<rewrite>
<rules>
<clear />
<rule name="app" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="iisnode.+" negate="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="App.js" />
</rule>
</rules>
</rewrite>
Its starting the App.js automatically, but its re directing all my views to the App.js script. I guess it has something to do with the re write code i put above. What changes should i make to get the App.js running on start up and still be able to access my other html views?
Thanks