# noderel

> Noderel a development tool for Node.js that automatically restarts the node process when a file is modified.

Latest version **1.0.14** (published 2024-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install noderel
pnpm add noderel
yarn add noderel
bun add noderel
```

Provides the command `noderel`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.14 |
| Published | 2024-08-16 |
| First published | 2021-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 3 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Haikel Fazzani |
| Maintainers | haikel |
| Keywords | hot reload, monitor, process, reload, watch, nodemon, supervisor |

## Links

- npm: https://www.npmjs.com/package/noderel
- Repository: https://github.com/wutility/noderel
- Homepage: https://wutility.github.io/noderel
- Issues: https://github.com/wutility/noderel/issues
- npm.io page: https://npm.io/package/noderel

## Dependencies (3)

- [chokidar](https://npm.io/package/chokidar.md) ^3.6.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [tree-kill](https://npm.io/package/tree-kill.md) ^1.2.2

## Recent versions

- 1.0.14 (latest) — 2024-08-16
- 1.0.13 — 2022-10-11
- 1.0.12 — 2022-10-07
- 1.0.11 — 2022-10-07
- 1.0.10 — 2022-10-07
- 1.0.9 — 2022-10-07
- 1.0.8 — 2022-10-07
- 1.0.7 — 2022-10-04
- 1.0.6 — 2022-10-04
- 1.0.5 — 2022-10-04
- 1.0.4 — 2022-10-03
- 1.0.3 — 2022-09-22
- 1.0.2 — 2022-09-19
- 1.0.1 — 2022-09-19
- 1.0.0 — 2022-08-22
- … 9 more at https://npm.io/package/noderel/versions

## README

# ↻ ♾️ NodeRel
[NodeRel](https://wutility.github.io/noderel) is a tool that automatically restarting the node application when file changes.

![downloads](https://badgen.net/npm/dt/noderel) ![version](http://img.shields.io/npm/v/noderel.svg)


- Fast and simple to use.
- Automatic re-running.
- Manual restarting.
- Monitoring multiple directories.
- Ignoring files.
- Delaying restarting.

# Installation
```shell
npm install -g noderel 
# yarn global add noderel
```

## CLI
```shell
# all configs are optional 
noderel --entry bin/server.js --watch routes,app --delay 150

# short
noderel -e server.js -w routes,app -d 150
```

# API
```js
const Noderel = require('noderel');
const noderel = Noderel(configuration?: Object): void

noderel.start()
noderel.stop()
```

# CLI options

| 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                |

# Configuration file
```js
// 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",
}
```

# Built with
- [Spawn childprocess](https://nodejs.org/docs/latest-v16.x/api/child_process.html#class-childprocess)
- [tree-kill](https://www.npmjs.com/package/tree-kill)
- [minimist](https://www.npmjs.com/package/minimist)
- [chokidar](https://www.npmjs.com/package/chokidar)

# Capture
![Capture](capture.png)

# License
![MIT](https://badgen.net/npm/license/noderel)

---
_Source: https://npm.io/package/noderel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
