Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tkambler committed Jul 22, 2015
1 parent 6de3757 commit d866305
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,38 @@ There are [several examples][1] designed to test the fault tolerance of forever.
$ forever -m 5 examples/error-on-timer.js
```

### JSON Configuration Files

In addition to passing forever the path to a script (along with accompanying options, described above), you may also pass forever the path to a JSON file, in which these options are defined. For example, consider an application with the following file structure:

```
.
├── forever
│ └── development.json
└── index.js
// forever/development.json
{
"uid": "app",
"append": true,
"watch": true,
"script": "index.js",
"sourceDir": "/home/myuser/app"
}
```

This application could be started with forever, as shown below:

``` bash
$ forever start ./forever/development.json
```

Absolute paths to such configuration files are also supported:

``` bash
$ forever start /home/myuser/app/forever/development.json
```

### Using In Your Code
The forever module exposes some useful methods to use in your code. Each method returns an instance of an EventEmitter which emits when complete. See the [forever cli commands][2] for sample usage.

Expand Down

0 comments on commit d866305

Please sign in to comment.