Skip to content

Instantly share code, notes, and snippets.

@yano3nora
Created May 7, 2023 23:19
Show Gist options
  • Save yano3nora/1d02719d2e225bcf2d11da6ee9868df8 to your computer and use it in GitHub Desktop.
Save yano3nora/1d02719d2e225bcf2d11da6ee9868df8 to your computer and use it in GitHub Desktop.
[dev: Nodemon]

Overview

github.com/remy/nodemon
nodemon.io

  • 駐在 (daemonize) する node プロセスを「コード変更」を起点に再起動させるユーティリティ
  • node server.js のようなサーバ実行コマンドで nodemon server.js のように使う
  • 再起動時の signal や watch するファイルの指定など色々できる
    • nodemon.json で設定を渡したりとかも可能
$ npm i -D nodemon

$ npx nodemon server.js
$ npx nodemon --watch /src --signal SIGTERM server.js 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment