0

I want to start the node js server by running my App.js script in cmd prompt when the roles start.(running "node App.js" in cmd.exe)

I came across the functionality of start up tasks in azure. Something like this

<Startup>
  <Task commandLine="cmd.exe node App.js" executionContext="elevated" taskType="background">
  </Task>
</Startup>

But it doesnt work. Does anyone know how to put the write command in commandLine for App.js to run? And also itseems the commandLine task is relative to the AppRoot\Bin folder for the deployment, so i would have to put cmd.exe and App.js in bin folder. i dont think its feasible to put them in bin folder when it comes to publishing to my azure account?

Either way it would be highly appreciated if anyone can tell me how to start node js scripts automatically when my roles start.

Thanks

Bitsian
  • 2,238
  • 5
  • 37
  • 72

1 Answers1

-1

Please read one of below articles.

normalian
  • 55
  • 3
  • 1
    Both the articles are in japanese and its hard to get anything out of it. Could you please post some relevant excerpts out of it in english here? – Bitsian Mar 11 '13 at 12:39
  • And from the little bit i got from the article, i am guessing the node js file and all node modules have to be kept in worker role? can it not be done with keeping these files in web role itself? – Bitsian Mar 11 '13 at 13:46