GithubHelp home page GithubHelp logo

initd-forever's Introduction

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

initd-forever's People

Contributors

92bondstreet avatar

Watchers

Navid Nikpour avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.