Skip to content

Instantly share code, notes, and snippets.

@YuukiToriyama
Created January 12, 2021 12:51
Show Gist options
  • Save YuukiToriyama/de822531d727e08f39a70ecbad7e7856 to your computer and use it in GitHub Desktop.
Save YuukiToriyama/de822531d727e08f39a70ecbad7e7856 to your computer and use it in GitHub Desktop.
nodemonの使い方

nodemonの使い方

nodemonとは

  • remy/nodemon
  • https://github.com/remy/nodemon
  • Monitor for any changes in your node.js application and automatically restart the server - perfect for development
  • ファイルの変更を検知して自動的にコードを再実行してくれるパッケージ

使い方

インストール

  1. npmを使って使用したいプロジェクトにnodemonをインストール
npm install -D nodemon
  1. package.jsonのscriptsを書き換える
"scripts": {
  "start": "node index.js"
}
  1. Go!
npm start

nodemonのここがおすすめ

  • 開発の際にコードの編集、実行、ctrl+Cの繰り返しをする必要がなくなる
    • 効率がまあまあアップする
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment