Skip to content

Commit 4f76cca

Browse files
committed
Start npm server
1 parent c5384d7 commit 4f76cca

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const shell = require("child_process");
2+
13
// Load cli
24
let cli = require("./lib/cli")();
35
let config = new (require("./lib/config"))();
@@ -16,3 +18,15 @@ catch (ex) {
1618
console.log("Could not load config.");
1719
process.exit();
1820
}
21+
22+
// Start the engine
23+
24+
/// Check for input server command
25+
if (config.input && config.input.directory && config.input.runcmd) {
26+
27+
// Run the command
28+
console.log("Starting server...");
29+
let cmd = "cd " + config.input.directory + " && " + config.input.runcmd;
30+
shell.execSync(cmd);
31+
32+
}

0 commit comments

Comments
 (0)