Skip to content

imdevin567/nupstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nupstart

Upstart for Node.js

Features

  • Leverages existing Linux utilities
  • Creates and runs Upstart scripts for Node.js applications to run them as daemons in the background
  • Command-line interface to manage apps with a simple JSON config file
  • Simple API to manage apps programmatically
  • API and CLI to monitor processes

TODO

  • Web interface to monitor and launch applications

Node Dependencies

  • Commander 2.1.0

Build Status

Build Status

Master : Build Status

Usage/Features

processfile

Nupstart CLI depends on a JSON config file located at /etc/nupstart/processfile. This file is created initially after running nupstart setup and should be edited to reflect the apps you wish to manage with nupstart. The format is simple:

{
    "myappname" : {
    	"script" 	: "/var/www/myappname/app.js",
		"logfile" 	: "/var/log/myappname-nupstart.log"
	},
	"myotherapp" : {
		"script"	: "/var/www/myotherapp/main.js",
		"logfile"	: "/var/log/venus/myotherapp-nupstart.log"
	}
}

Name and "script" are required. The "logfile" parameter is optional.

You can then start "myappname" as a daemon by running nupstart start myappname. Or, start all apps by running nupstart start all.

CLI Usage

$ npm install https://github.com/imdevin567/nupstart/tarball/master -g     # Install nupstart globally

$ nupstart setup        # Run this after install to setup needed files and directories

$ nupstart start app    # Create and run Upstart script for "app" specified in processfile

$ nupstart stop app     # Stop "app" specified in processfile

$ nupstart start all    # Creates and runs Upstart scripts for all apps specified in processfile

$ nupstart stop all     # Stops all apps specified in processfile

$ nupstart clean        # Stops all apps in processfile and removes existing Upstart scripts

$ nupstart stats		# Outputs a json string of the process stats

License

Nupstart is available through the MIT license.

Author


Bitdeli Badge

About

Upstart for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published