From 06855adaa582833c9e99fe81188926fa25a4ed8c Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Fri, 1 Mar 2019 10:33:16 -0600 Subject: [PATCH] Create working directory if it doesn't exist --- packages/server/src/cli.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 1532f62..d83fd94 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -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;