Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
benoror committed Dec 9, 2015
1 parent 69570ae commit 2dafaff
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,31 @@ To this:
}
```

Also if you have .env file in your project root it will be loaded on every command
# .env File

If you have an `.env` file in your project root it will be loaded on every command

```
NODE_PATH=./:./lib
PORT=5000
```
```

# Shell scripts

Currently, using [bash variables](http://tldp.org/LDP/abs/html/internalvariables.html) (PWD, USER, etc.) is not possible:

``` JSON
"command": "forever start -l ${PWD}/logs/forever.log -o ${PWD}/logs/out.log -e ${PWD}/logs/errors.log -a index.js",
```

In order to use them, you can create an script file (`.sh`) instead:

`forever.sh`:
``` bash
forever start -l ${PWD}/logs/forever.log -o ${PWD}/logs/out.log -e ${PWD}/logs/errors.log -a index.js
```

`package.json`:
``` javascript
"command": "./forever.sh"
```

0 comments on commit 2dafaff

Please sign in to comment.