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.
npm install -g noderel
# yarn global add noderel
# all configs are optional
noderel --entry bin/server.js --watch routes,app --delay 150
# short
noderel -e server.js -w routes,app -d 150
const Noderel = require('noderel');
const noderel = Noderel(configuration?: Object): void
noderel.start()
noderel.stop()
Prop | Default | Description |
---|---|---|
--help or -h |
- |
display usage info for all commands |
--version or -v |
- |
display package version |
--entry or -e |
(package.json).main |
Set entry file |
--watch or -w |
. |
Set the watch directories or files. |
--ignore or -i |
node_modules,tests |
which's files or folders should be ignored |
--delay or -d |
100 |
Realod time between changes (ms). |
--verbose or -V |
true |
Show logs |
--allow-restart or -R |
true |
allow restart when typing rs |
--override or -O |
node (package.json).main |
override the default command |
// 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", ".git"],
"delay": 150,
"verbose": true,
"allowRestart": true, // allow restart when typing `rs`
"override": "python3 app.py",
}