Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Service = require('node-windows').Service;
- // Create a new service object
- var svc = new Service({
- name:'Hello World',
- description: 'The nodejs.org example web server.',
- script: 'C:\path\to\helloworld.js'
- });
- // Listen for the "install" event, which indicates the
- // process is available as a service.
- svc.on('install',function(){
- svc.start();
- });
- svc.install();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement