Skip to content

nvdnkpr/initd-forever

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INITD-FOREVER Build Status

initd-forever is a node.js module to create a daemon for your nodejs application.

The package generates a shell script for /etc/init.d using forever package.

It generates also a shell script for monitoring daemon with the debain package monit

Keynote

Installation

You can install initd-forever and its dependencies with npm:

npm install initd-forever -g for a global installation (for example)

Usage

To generate daemon and monit files from the command line, use following options:

	$ initd-forever --help
	usage: initd-forever [options]

	Generate the script file as a daemon and the monit script file.

	options:
		-a, --app			APP			Path to node.js main js file
		-e, --env			ENV			Export NODE_ENV with ENV value
		-l, --logfile		LOGFILE     Logs the daemon output to LOGFILE
		-n, --name			NAME		Application name
		-p, --pidfile		PIDFILE		The pid file
		-m, --monit			MONITPORT	Generate the monit script file with the port number MONITPORT where your application runs
	Error:
	Cannot generate daemon file: no options defined and package.json is not found.

For missing options, initd-forever will use values saved in the package.json.

Options

app

Default is the main defined in package.json

env

Default is production

name

Default is the name defined in package.json

logfile

Default is based on name value: /var/run/name.log

pidfile

Default is based on name value: /var/run/name.pid

monit

Default doesn't generate the monit script file.

Running tests

To run the tests under node you will need mocha and should installed (it's listed as a devDependencies so npm install from the checkout should be enough), then do

$ npm test

Project status

initd-forever is currently maintained by Yassine Azzout.

Authors and contributors

Current

License

MIT license

About

Node.js module to create a daemon for your nodejs application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published