8

I need something like this:

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"  
}]

Is that possible, or if there is some alternative way to do it?

Jorge Gil
  • 4,265
  • 5
  • 38
  • 57
Vladimir
  • 1,751
  • 6
  • 30
  • 52

1 Answers1

5

Use the array for watch option

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

You can look at the sample here https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md

Goolishka
  • 210
  • 1
  • 11