846 B
846 B
serviceman
A cross-platform service manager
serviceman add --name "my-project" node ./serve.js --port 3000
serviceman stop my-project
serviceman start my-project
Works with launchd (Mac), systemd (Linux), or standalone (Windows).
Meta Package
This is a meta-package to fetch and install the correction version of go-serviceman for your architecture and platform.
npm install serviceman
How does it work?
- Resolves executable from PATH, or hashbang (ex:
#!/usr/bin/env node
) - Resolves file and directory paths to absolute paths (ex:
/Users/me/my-project/serve.js
) - Creates a template
.plist
(Mac),.service
(Linux), or.json
(Windows) file - Calls
launchd
(Mac),systemd
(Linux), orserviceman-runner
(Windows) to enable/start/stop/etc