2025-03-14 21:59:59 -06:00
|
|
|
# nodemon
|
|
|
|
|
|
|
|
|
|
> Watch files and automatically restart a node application when changes are detected.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://github.com/remy/nodemon/tree/main/doc/cli>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Execute the specified file and watch a specific file for changes:
|
|
|
|
|
|
|
|
|
|
`nodemon {{path/to/file.js}}`
|
|
|
|
|
|
|
|
|
|
- Manually restart nodemon (note nodemon must already be active for this to work):
|
|
|
|
|
|
|
|
|
|
`rs`
|
|
|
|
|
|
|
|
|
|
- Ignore specific files:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`nodemon {{[-i|--ignore]}} {{path/to/file_or_directory}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Pass arguments to the node application:
|
|
|
|
|
|
|
|
|
|
`nodemon {{path/to/file.js}} {{arguments}}`
|
|
|
|
|
|
|
|
|
|
- Pass arguments to node itself if they're not nodemon arguments already (e.g. `--inspect`):
|
|
|
|
|
|
|
|
|
|
`nodemon {{arguments}} {{path/to/file.js}}`
|
|
|
|
|
|
|
|
|
|
- Run an arbitrary non-node script:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`nodemon {{[-x|--exec]}} "{{command_to_run_script}} {{options}}" {{path/to/script}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a Python script:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`nodemon {{[-x|--exec]}} "python {{options}}" {{path/to/file.py}}`
|