Fix missing memory.txt issue
This commit is contained in:
parent
065f5c18e7
commit
8603734c7a
1 changed files with 3 additions and 0 deletions
3
app.js
3
app.js
|
|
@ -14,6 +14,9 @@ import bcrypt from "bcrypt";
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3000;
|
||||||
const __dirname = process.cwd();
|
const __dirname = process.cwd();
|
||||||
const ACTIVE_CODES = new Set();
|
const ACTIVE_CODES = new Set();
|
||||||
|
if (!fs.existsSync("./memory.txt")) {
|
||||||
|
fs.writeFileSync("./memory.txt", "", "utf-8");
|
||||||
|
}
|
||||||
let TOKENS = fs
|
let TOKENS = fs
|
||||||
.readFileSync("./memory.txt", "utf-8")
|
.readFileSync("./memory.txt", "utf-8")
|
||||||
.trim()
|
.trim()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue