Fix missing memory.txt issue

This commit is contained in:
Cohen Erickson 2023-02-14 01:04:34 +00:00
parent 065f5c18e7
commit 8603734c7a

3
app.js
View file

@ -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()