I have to start two socket.io processes in my azure worker role. I followed the steps in this link Below is my ServiceDefinition.csdef
<WorkerRole name="WorkerRole1">
<Startup>
<Task commandLine="setup_worker.cmd > log.txt" executionContext="elevated">
<Environment>
<Variable name="EMULATED" value="false"/>
<Variable name="RUNTIMEID" value="node" />
<Variable name="RUNTIMEURL" value="http://az413943.vo.msecnd.net/node/0.6.20.exe" />
</Environment>
</Task>
</Startup>
<Endpoints>
<InputEndpoint name="HttpIn" protocol="tcp" port="80" />
</Endpoints>
<Runtime>
<Environment>
<Variable name="PORT">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[@name='HttpIn']/@port" />
</Variable>
<Variable name="EMULATED">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
</Environment>
<EntryPoint>
<ProgramEntryPoint commandLine="node.cmd .\server.js" setReadyOnProcessStart="false" />
</EntryPoint>
</Runtime>
<Imports>
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
<Import moduleName="Diagnostics" />
</Imports>
<LocalResources>
<LocalStorage name="WorkerLocalStorage" cleanOnRoleRecycle="false" sizeInMB="1024" />
</LocalResources>
In this I am starting server.js on runtime, but I would also like to start another socket.io script along with it. The reason being I dont want to use another worker role for a small application. Just to save cost. I tried to start it as a start up task but the worker role was hanging/cycling when i started the cloud service in emulator with no error info in the output dialog box. So am guessing the socket.io scripts can only be started in the runtime section. Is there any way I can start both my socket.io scripts in a single worker role?