↻ ♾️ NodeRel
NodeRel is a tool that automatically restarting the node application when file changes.
- Fast and simple to use.
- Automatic re-running.
- Manual restarting.
- Monitoring multiple directories.
- Ignoring files.
- Delaying restarting.
Installation
npm install -g noderel
# yarn global add noderel
CLI
# all configs are optional
noderel --entry bin/server.js --watch routes,app --delay 150 --verbose=false --allow-restart=true
# short
nnoderel -e tests/server.js -w routes,app -d 150 -v -r
API
const noderel = require('noderel');
noderel(configuration?: Object): void
Configuration
Prop | Default | Description |
---|---|---|
entry | (package.json).main |
Set entry file |
watch | . |
Set the watch directories or files. |
ignore | `/node_modules\ | (^\ |
delay | {% raw %}100
|
Realod time between changes (ms). |
verbose | true |
Show logs |
allow-restart | true |
allow restart when typing rs
|
Config file
// noderel.json
// A config file can take any of the command line arguments as JSON key values, for example:
{
"entry": "tests/server.js",
"watch": ["src", "bin"],
"ignore": "**/{node_modules,tests,dist,temp,.git}/*",
"delay": 150,
"verbose": true,
"allowRestart": true // allow restart when typing `rs`
}
Top comments (0)