Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

New Post: Running a task on role start in Azure

$
0
0
Hi,

I would like to run a simple command line script when the Node JS web role is ready to start on Azure.

In the C# world this is done by adding the following to the service definition:
<Runtime><EntryPoint><NetFxEntryPointassemblyName="MyWeb.dll"targetFrameworkVersion="v4.0"/></EntryPoint></Runtime>
And then in MyWeb.dll we add a class that derives from RoleEntryPoint and override the required methods:
publicclass MyRole : RoleEntryPoint
{
   publicoverridebool OnStart()
   { 
      // Run the command line script herereturnbase.OnStart();
   }
}
Does anyone know the equivalent of this for a Node JS website?

What can be declared in the service definition that would cause Azure to look for an entry point in the deployed Node JS project?

Thanks.

Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>