Allow server port to be chosen and update example

This commit is contained in:
Frank Li 2017-07-11 14:48:57 -07:00
parent 6fbde4eead
commit 0f6800df10
3 changed files with 8 additions and 5 deletions

View file

@ -14,5 +14,10 @@ require("babel-register")({
presets: ["react"]
});
let port = 3000;
if (process.argv.length > 2) {
port = process.argv[2];
}
const server = require("./server/server.js");
server();
server(port);