Switch from ts-node to tsc-watch for faster watch restarts; move format npm script to project root

This commit is contained in:
Dragory 2019-11-30 17:04:59 +02:00
parent fd8a4598aa
commit 2a646f5a6e
6 changed files with 161 additions and 77 deletions

18
backend/start-dev.js Normal file
View file

@ -0,0 +1,18 @@
/**
* This file starts the bot and api processes in tandem.
* Used with tsc-watch for restarting on watch.
*/
const childProcess = require("child_process");
const cmd = process.platform === "win32"
? "npm.cmd"
: "npm";
childProcess.spawn(cmd, ["run", "start-bot-dev"], {
stdio: [process.stdin, process.stdout, process.stderr],
});
childProcess.spawn(cmd, ["run", "start-api-dev"], {
stdio: [process.stdin, process.stdout, process.stderr],
});