export server

This commit is contained in:
Jake Howard 2017-02-17 21:39:44 +00:00
parent 390c1e80cd
commit 00e00ad749

View file

@ -8,11 +8,10 @@ console.log("Starting Server...");
const ARGS = getArgs(); const ARGS = getArgs();
const app = createServer(ARGS); const app = createServer(ARGS);
const server = app.listen(ARGS.port, function () { export const server = app.listen(ARGS.port, function () {
const port = server.address().port; const port = server.address().port;
console.log("Server started on port " + port); console.log("Server started on port " + port);
if (ARGS.open) { if (ARGS.open) {
open('http://0.0.0.0:' + port); open('http://0.0.0.0:' + port);
} }
}); });