LoginSignup
10
8

More than 5 years have passed since last update.

node-supervisor

Posted at

expressでの開発で、ソースを修正するたびに手動で再起動する不便を解消してくれるツール。
元々はIsaacさんが作ったようけど、今は別の人がメンテしているようです。
nodeの開発者にとってはこういうツールを使うの常識なんだろうけど、知らなかったので φ(..)メモメモ

  • インストール
npm install supervisor -g
  • 使い方
supervisor [options] <program>
supervisor [options] -- <program> [args ...]
  • 主なオプション

-w 監視するフォルダ、ファイルを指定。デフォルトは.
-i 変更を無視する対象を指定。
-e 対象の拡張子指定。デフォルトはnode,js

npm start と打っていたのを下記のコマンドを打つようにした。

supervisor -i node_modules ./bin/www
  • その他

node-dev、nodemonなど、類似のものは色々あるみたい。
自分の使い方だと、どれ使っても変わらない気がするけど、しばらくnode-supervisorを使ってみようと思います。

https://github.com/fgnass/node-dev
https://github.com/remy/nodemon

10
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
8