mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-03 12:17:20 +02:00
Fix port check (#173)
Since the check is async, starting the server on the port was happening before the check finished. Thus even if the port wasn't being used, it would error out as if it was because the server would start it before the check was finished. This way we only start the server after the check finishes.
This commit is contained in:
parent
867a49dd1c
commit
e0345bae86
1 changed files with 4 additions and 4 deletions
|
@ -43,9 +43,9 @@ tcpPortUsed.check(port, "localhost")
|
|||
chalk.red("Port " + port + " is in use")
|
||||
);
|
||||
process.exit(1);
|
||||
} else {
|
||||
// start local server on specified port
|
||||
const server = require("./server/server.js");
|
||||
server(port);
|
||||
}
|
||||
});
|
||||
|
||||
// start local server on specified port
|
||||
const server = require("./server/server.js");
|
||||
server(port);
|
||||
|
|
Loading…
Add table
Reference in a new issue