From 8603734c7a9bf95fc28210712158593f09e212e6 Mon Sep 17 00:00:00 2001 From: Cohen Erickson Date: Tue, 14 Feb 2023 01:04:34 +0000 Subject: [PATCH] Fix missing memory.txt issue --- app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.js b/app.js index 24d1fb6..0e27b6c 100644 --- a/app.js +++ b/app.js @@ -14,6 +14,9 @@ import bcrypt from "bcrypt"; const PORT = process.env.PORT || 3000; const __dirname = process.cwd(); const ACTIVE_CODES = new Set(); +if (!fs.existsSync("./memory.txt")) { + fs.writeFileSync("./memory.txt", "", "utf-8"); +} let TOKENS = fs .readFileSync("./memory.txt", "utf-8") .trim()