-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (31 loc) · 816 Bytes
/
index.js
File metadata and controls
37 lines (31 loc) · 816 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
36
37
#!/usr/bin/env node
const cmd = process.argv[2];
if (cmd === "-v" || cmd === "--version" || cmd === "version") {
console.log(require("./package.json").version);
process.exit(0);
}
const modules = require('./util.modules');
const executed = require('./util.cli')(modules);
if (!executed) {
const nodemon = require("nodemon");
nodemon({
script: __dirname + "/util.runtime.js",
watch: [
process.cwd() + "/server",
process.cwd() + "/angular.json",
process.cwd() + "/react.json",
process.cwd() + "/vue.json",
process.cwd() + "/config.json",
__dirname + "/server",
__dirname + "/config.json",
],
ext: "js json",
});
nodemon
.on("start", () => {
console.log(" ===== App has started ===== ");
})
.on("restart", () => {
console.log(" ===== App restarted ===== ");
});
}