Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpgall committed Sep 12, 2014
1 parent 5771c1f commit 242b43d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Startup script for Linux-based systems for running a [Node.js](http://nodejs.org

When my VPS was rebooted occassionally by the hosting provider, my Node.js app was not coming back online after boot. This script can be used in **/etc/init.d**, which will allow rc.d to restart your app when the machine reboots without your knowledge.

If you are using MongoDB, Redis, or Nginx, you want to add those to your default run-level as well.
If you are using [MongoDB](http://www.mongodb.org/), [Redis](http://redis.io/), or [Nginx](http://nginx.org/), you want to add those to your default run-level as well.

##Installation##

Expand All @@ -19,7 +19,7 @@ Edit the **node-app** script with your settings from the **Configuration** secti

##Configuration##

At the top of the **node-app** file, a few items are declared which are either passed to the Node.js app or for general execution.
At the top of the **node-app** file, a few items are declared which are either passed to the Node.js app or used for general execution/management.

###Node.js Config###

Expand All @@ -37,13 +37,13 @@ The items declared and passed to the Node.js application are:

The items declared and used by the overall management of executing the application are:

- **NODE_EXEC** - location of the Node.js package executable - useful to set if the executable isn't on your PATH or isn't a service (default uses `which node`)
- **NODE_EXEC** - location of the Node.js package executable - useful to set if the executable isn't on your PATH or isn't a service (defaults to `$(which node)`)
- **APP_DIR** - location of the Node.js application directory (defaults to **"/var/www/example.com"**)
- **NODE_APP** - filename of the Node.js application (defaults to **"app.js"**)
- **PID_DIR** - location of the PID directory (defaults to **"$APP_DIR/pid"**)
- **PID_FILE** - name of the PID file (defaults to **"app.pid"**)
- **PID_FILE** - name of the PID file (defaults to **"$PID_DIR/app.pid"**)
- **LOG_DIR** - location of the log (Node.js application output) directory (defaults to **"$APP_DIR/log"**)
- **LOG_FILE** - name of the log file (defaults to **"app.log"**)
- **LOG_FILE** - name of the log file (defaults to **"$LOG_DIR/app.log"**)

##Running##

Expand All @@ -61,12 +61,12 @@ The service exposes 4 actions:
- **restart** - stops the Node.js application, then starts the Node.js application
- **status** - returns the current running status of the Node.js application (based on the PID file and running processes)

####Force####
####Force Action####

In addition to the **start**, **stop**, and **restart** actions, a **--force** option can be added to the execution so that the following scenarios have the following outcomes:

- **start** - PID file exists but application is stopped -> removes PID file and starts the application
- **stop** - PID file exists but application -> removes PID file
- **stop** - PID file exists but application is stopped -> removes PID file
- **restart** - either of the above scenarios occur

###Testing###
Expand Down

0 comments on commit 242b43d

Please sign in to comment.