Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to start node js script in a windows azure cloud project?
    text
    copied!<p>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.</p> <p>I can also go to 127.0.0.1/App.js and the socket.io server starts.</p> <p>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?</p> <p>EDIT:</p> <p>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 <a href="http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/" rel="nofollow">http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/</a> i got this rewrite code</p> <pre><code>&lt;rewrite&gt; &lt;rules&gt; &lt;clear /&gt; &lt;rule name="app" enabled="true" patternSyntax="ECMAScript" stopProcessing="true"&gt; &lt;match url="iisnode.+" negate="true" /&gt; &lt;conditions logicalGrouping="MatchAll" trackAllCaptures="false" /&gt; &lt;action type="Rewrite" url="App.js" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p>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? </p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload