about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.ts5
-rw-r--r--src/config.ts6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/app.ts b/src/app.ts
index b41de44..727ec2f 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -11,10 +11,9 @@ Sentry.init({
   tracesSampleRate: 1.0,
 });
 
-const base = ".";
-const publicDir = path.resolve(base, "public") + path.sep;
+const publicDir = "public" + path.sep;
 
-const config = readConfig(base);
+const config = readConfig();
 const defaultHeaders = {
   ...config.extra.headers,
   vary: "Accept-Encoding",
diff --git a/src/config.ts b/src/config.ts
index 064b038..8fbe3c1 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -2,8 +2,6 @@ import path from "node:path";
 import fs from "node:fs";
 import toml from "toml";
 
-export default function readConfig(base: string) {
-  const filename = path.join(base, "config.toml");
-
-  return toml.parse(fs.readFileSync(filename, "utf-8"));
+export default function readConfig() {
+  return toml.parse(fs.readFileSync("config.toml", "utf-8"));
 }