summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-08-16 18:13:15 +0200
committerJules Laplace <julescarbon@gmail.com>2021-08-16 18:13:15 +0200
commit52a05f00e39270910c3dc41faede0206f698c0e6 (patch)
tree777155cb31583b5ed0bb0683a74d1548ed772b0a
parentb8422fbb19d766d5e2e7b72e346329bd406952e2 (diff)
db.json
-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();
}