我开始玩Koa ,但到目前为止还没有找到合适的解决方案来在代码更改时自动重新加载应用程序。
我的理解是nodemon是 Node 世界中的首选解决方案,但由于 --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
应该足够了
关于node.js - 自动重新加载 Koa 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22062298/