我已经开始使用Koa了,但是到目前为止,仍找不到合适的解决方案来在代码更改后自动重新加载应用程序。
我的理解是nodemon是Node Universe中的首选解决方案,但是由于该--harmony
标志(Koa要求),我遇到了错误:
$ node_modules/.bin/nodemon /path/to/node-unstable/bin/node app.js
/path/to/node-unstable/bin/node --harmony $@
^^^^^^^
SyntaxError: Unexpected identifier
[nodemon] app crashed - waiting for file changes before starting...
node_modules/.bin/nodemon --harmony-generators app.js
应该足够了
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句