about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-01 20:34:46 +0200
committerAlan Pearce2024-04-01 20:34:46 +0200
commit121f0ef2ea93a4a979a97935db2bd1d91b6adffd (patch)
tree51322c676dcb0b5580fee00d74f60b085a2f5863
parent53d704777f8899b8750b083cef47b8fdf5830373 (diff)
downloadwebsite-121f0ef2ea93a4a979a97935db2bd1d91b6adffd.tar.lz
website-121f0ef2ea93a4a979a97935db2bd1d91b6adffd.tar.zst
website-121f0ef2ea93a4a979a97935db2bd1d91b6adffd.zip
config: override base_url in development
-rw-r--r--src/config.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config.ts b/src/config.ts
index a96b9c5..cbf6b3a 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -2,4 +2,8 @@ import path from "node:path";
 import fs from "node:fs";
 import toml from "toml";
 
-export default toml.parse(fs.readFileSync("config.toml", "utf-8"));
+const config = toml.parse(fs.readFileSync("config.toml", "utf-8"));
+if (import.meta.env.NODE_ENV === "development") {
+  config.base_url = "http://localhost:3000";
+}
+export default config;