Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save crowjdh/a8cd776c2b49585862c3519330ad7f1e to your computer and use it in GitHub Desktop.
Save crowjdh/a8cd776c2b49585862c3519330ad7f1e to your computer and use it in GitHub Desktop.

Scripts

{
  ...,
  "scripts": {
    "watch-ts": "nohup npx tsc --watch >> watch_ts.log 2>&1 &",
    "watch-js": "nohup npx nodemon dist/index.js >> watch_js.log 2>&1 &",
    "dev": "npm run watch-ts; npm run watch-js; tail -f watch_ts.log -f watch_js.log"
  },
  ...
}

Run

$ npm run dev

Note

This will kill both processes(tsc & nodemon) once you kill the parent process(npm run dev)

@crowjdh
Copy link
Author

crowjdh commented Apr 9, 2021

This will kill both processes(tsc & nodemon) once you kill the parent process(npm run dev)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment