0.2.0 • Published 11 years ago
service-manager v0.2.0
node-service-manager
A Linux(and soon Windows) Service Manager for node.js
How to use
Services can be installed in two ways
- Via node.js code using the node-service class
- Via servicemgr that comes with the package(when using npm install)
Via code
var service = require('service-manager');
var svc = new service.Service({
name: "test",
displayname: "Test Server",
description: "This is a test server!",
run: "node",
args: ["/root/test-server.js"]
});
// To install the service
svc.install();
// To uninstall the service
svc.uninstall();
Via the command-line
servicemgr install test node /root/test-server.js
servicemgr uninstall test