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;