export server
This commit is contained in:
parent
390c1e80cd
commit
00e00ad749
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue