-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker.js
More file actions
35 lines (33 loc) · 759 Bytes
/
docker.js
File metadata and controls
35 lines (33 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* @file docker-entry for development container
*/
"use strict";
const { spawn, exec } = require("child_process");
process.on("SIGINT", function () {
console.log("Process terminating...");
process.exit(0);
});
/*
* Restart node when a source file changes, plus:
* Restart when `npm install` ran based on `package-lock.json` changing.
*/
console.log(
"===================>DEVELOPMENT START [DEBUG=" +
process.env.DEBUG +
"]<======================="
);
/*
* Install dependencies every time package.json changes
*/
spawn('nodemon -w package.json --exec "npm install"', {
stdio: "inherit",
shell: true,
});
spawn("npm run watch", {
stdio: "inherit",
shell: true,
});
spawn("npm run dev", {
stdio: "inherit",
shell: true,
});