2020-09-08 19:45:43 -04:00
|
|
|
# nodemon
|
|
|
|
|
|
|
|
> Watch files and automatically restart a node application when changes are detected.
|
|
|
|
> More information: <https://nodemon.io>.
|
|
|
|
|
|
|
|
- Execute the specified file and watch a specific file for changes:
|
|
|
|
|
2021-10-03 22:23:26 +02:00
|
|
|
`nodemon {{path/to/file.js}}`
|
2020-09-08 19:45:43 -04:00
|
|
|
|
|
|
|
- Manually restart nodemon (note nodemon must already be active for this to work):
|
|
|
|
|
|
|
|
`rs`
|
|
|
|
|
|
|
|
- Ignore specific files:
|
|
|
|
|
|
|
|
`nodemon --ignore {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
- Pass arguments to the node application:
|
|
|
|
|
|
|
|
`nodemon {{path/to/file.js}} {{arguments}}`
|
|
|
|
|
2021-10-03 22:23:26 +02:00
|
|
|
- Pass arguments to node itself if they're not nodemon arguments already (e.g. `--inspect`):
|
|
|
|
|
|
|
|
`nodemon {{arguments}} {{path/to/file.js}}`
|
|
|
|
|
2021-10-21 12:58:19 +05:30
|
|
|
- Run an arbitrary non-node script:
|
2020-09-08 19:45:43 -04:00
|
|
|
|
2021-10-21 12:58:19 +05:30
|
|
|
`nodemon --exec "{{command_to_run_script}} {{options}}" {{path/to/script}}`
|
|
|
|
|
|
|
|
- Run a Python script:
|
|
|
|
|
|
|
|
`nodemon --exec "python {{options}}" {{path/to/file.py}}`
|