npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

initd-forever

v0.1.8

Published

Create a daemon of a nodejs application

Downloads

49

Readme

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
		-c, --command	COMMAND	Command to execute on the nodejs file used for custom command line options
		-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
		-f, --forever   FOREVER	Path to forever script
	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/log/name.log

pidfile

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

monit

Default doesn't generate the monit script file.

forever

Default uses whatever script the environment variable points to

command

Default passes the nodejs executable '/usr/bin/env node'

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