summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js2
l---------public/assets/db.json1
l---------public/db.json1
-rw-r--r--src/index.js2
4 files changed, 4 insertions, 2 deletions
diff --git a/index.js b/index.js
index 5b40c83..c9aa338 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,7 @@
import okcms from "okcms";
import path from "path";
+import dotenv from "dotenv";
+dotenv.config();
const __dirname = path.resolve();
diff --git a/public/assets/db.json b/public/assets/db.json
new file mode 120000
index 0000000..5f9c0c0
--- /dev/null
+++ b/public/assets/db.json
@@ -0,0 +1 @@
+../../db.json \ No newline at end of file
diff --git a/public/db.json b/public/db.json
deleted file mode 120000
index 090e473..0000000
--- a/public/db.json
+++ /dev/null
@@ -1 +0,0 @@
-../db.json \ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 4c09857..e23db17 100644
--- a/src/index.js
+++ b/src/index.js
@@ -157,7 +157,7 @@ const choice = (list) => list[randint(list.length)];
const commonGroups = (a, b) => union(a.groups, b.groups);
async function loadDB() {
- const request = await fetch("/db.json");
+ const request = await fetch("/assets/db.json");
return await request.json();
}