mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 02:32:28 +02:00
Prettier formatting fixes
This commit is contained in:
parent
a49787a56e
commit
d14dff7480
1 changed files with 18 additions and 15 deletions
|
@ -35,7 +35,9 @@ program.option('--port <number>', 'Specify port number').parse(process.argv);
|
||||||
|
|
||||||
const port = parseInt(program.port, 10) || 3000;
|
const port = parseInt(program.port, 10) || 3000;
|
||||||
|
|
||||||
tcpPortUsed.check(port, 'localhost').then(function(inUse) {
|
tcpPortUsed
|
||||||
|
.check(port, 'localhost')
|
||||||
|
.then(function(inUse) {
|
||||||
if (inUse) {
|
if (inUse) {
|
||||||
console.error(chalk.red('Port ' + port + ' is in use'));
|
console.error(chalk.red('Port ' + port + ' is in use'));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -45,8 +47,9 @@ tcpPortUsed.check(port, 'localhost').then(function(inUse) {
|
||||||
const server = require('./server/server.js');
|
const server = require('./server/server.js');
|
||||||
server(port);
|
server(port);
|
||||||
}
|
}
|
||||||
}).catch(function(ex) {
|
})
|
||||||
|
.catch(function(ex) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
throw ex;
|
throw ex;
|
||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue