1

--watch .. を指定して nodemon を実行しても、警告が表示されます。

$nodemon app.js --watch
9 Jul 09:09:16 - [nodemon] v1.3.7
9 Jul 09:09:16 - [nodemon] to restart at any time, enter `rs`
9 Jul 09:09:16 - [nodemon] watching: *.*
9 Jul 09:09:16 - [nodemon] starting `node app.js`
Example app listening at http://:::3000
9 Jul 09:09:16 - [nodemon] watching 32,639 files - this might cause high cpu usage. To reduce use "--watch".
4

1 に答える 1

4

監視されるファイルの数を減らすため。監視するディレクトリを指定する必要があります: https://github.com/remy/nodemon#monitoring-multiple-directories

監視するファイル拡張子を指定して、この数を減らすこともできます: https://github.com/remy/nodemon#specifying-extension-watch-list

または、たとえば node_modules のような特定のパスを無視します: https://github.com/remy/nodemon#ignoring-files

于 2015-07-09T08:58:15.560 に答える