From d3a04d47f3329aa8c2180e6c86ee4dddee9a0cef Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 22 Mar 2019 10:57:49 +0100 Subject: [PATCH] Auto create dirs --- server.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server.js b/server.js index 95c9995..e155b24 100644 --- a/server.js +++ b/server.js @@ -11,6 +11,10 @@ const port = 8000; const aisPath = "pytron_run/ai_manager/" const aisPathOld = "pytron_run/ai_manager_old" +// Create the directories to store the files +try { fs.mkdirSync('pytron_run/ai_manager'); } catch { } +try { fs.mkdirSync('pytron_run/ai_manager_old'); } catch { } + let pythonRunning = false; let pythonShouldRun = false;