1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 12:15:26 +00:00

Create working directory if it doesn't exist

This commit is contained in:
Kyle Carberry 2019-03-01 10:33:16 -06:00
parent 0e5ed11597
commit 06855adaa5
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB

View File

@ -175,6 +175,11 @@ export class Entry extends Command {
} : undefined,
});
if (!fs.existsSync(workingDir)) {
logger.info("Creating working directory", field("working-dir", workingDir));
fs.mkdirSync(workingDir);
}
logger.info("Starting webserver...", field("host", flags.host), field("port", flags.port));
app.server.listen(flags.port, flags.host);
let clientId = 1;