LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

nodemon

automatically restarts Node

TLDR

Watch and restart Node app
$ nodemon [app.js]
copy
Watch specific extensions
$ nodemon -e [js,json] [app.js]
copy
Watch specific directory
$ nodemon --watch [src/] [app.js]
copy
Ignore files
$ nodemon --ignore [test/] [app.js]
copy
Execute with different runtime
$ nodemon --exec [ts-node] [app.ts]
copy
Delay restart
$ nodemon --delay [2] [app.js]
copy
Use config file
$ nodemon --config [nodemon.json]
copy

SYNOPSIS

nodemon [options] [script] [args]

DESCRIPTION

nodemon automatically restarts Node.js applications. Watches for file changes.The tool aids development. Restarts on save without manual intervention.

PARAMETERS

SCRIPT

Script to run.
-e EXT
File extensions to watch.
--watch DIR
Directories to watch.
--ignore PATTERN
Patterns to ignore.
--exec CMD
Execution command.
--delay SECS
Restart delay.
--help
Display help information.

CAVEATS

Development tool. Not for production. Watches file system.

HISTORY

nodemon was created by Remy Sharp to improve Node.js development workflow.

SEE ALSO

node(1), pm2(1), forever(1)

Copied to clipboard
Kai