diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-08-16 18:13:15 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-08-16 18:13:15 +0200 |
| commit | 52a05f00e39270910c3dc41faede0206f698c0e6 (patch) | |
| tree | 777155cb31583b5ed0bb0683a74d1548ed772b0a | |
| parent | b8422fbb19d766d5e2e7b72e346329bd406952e2 (diff) | |
db.json
| -rw-r--r-- | index.js | 2 | ||||
| l--------- | public/assets/db.json | 1 | ||||
| l--------- | public/db.json | 1 | ||||
| -rw-r--r-- | src/index.js | 2 |
4 files changed, 4 insertions, 2 deletions
@@ -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(); } |
