如何用nodemon观看多个文件夹?

时间:2017-07-28 11:22:42

标签: node.js typescript nodemon

我需要这样的东西:

nodemon.json:

[{
  "watch": ["src/api-gateway"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "ts-node ./src/api-gateway/main.ts"
},
{
  "watch": ["src/services/ping-service"],
  "ext": "ts",
  "ignore": ["src/**/*.spec.ts"],
  "exec": "ts-node ./src/services/ping-service/ping-service.ts"  
}]

这可能,或者是否有其他替代方法可以做到这一点?

1 个答案:

答案 0 :(得分:0)

使用数组观看选项

"watch": [
    "folder1",
    "folder2",
]

您可以在此处查看示例https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md