@connordeckers/servicejs
v1.0.5
Published
Create the necessary files to run a node package as a Linux background service.
Downloads
2
Maintainers
Readme
ServiceJS
Helps turn a node application into a native Linux service file.
Usage
At the moment, this package can only install system-wide services. As such, it will need to be run with sudo
, meaning that it's recommended that you install globally (npm i -g @connordeckers/servicejs
).
Once installed, run with sudo servicejs
in your projects root directory (alongside your package.json
file).
Commands
servicejs
: Run the wizardservicejs --skip
: Skip the wizard, use the defaults (best guesses)servicejs --start
: Start the serviceservicejs --stop
: Stop the serviceservicejs --restart
: Restart the serviceservicejs --reload
: Reload the serviceservicejs --status
: Get the service status
To do
- Make the service interactions check the existance of a service first.
- Allow user-level service generation. (allows use without sudo).
- If running as sudo, allow for generation of both styles (system-level and user-level).
- If not running as sudo, only create user-level.
- Provide help guidelines on how to enable user-level services (including lingering).
- See this StackExchange post for more info
- Add and confirm support for other OS's
- Currently only tested in Ubuntu