all repos — homestead @ 5de16f9e331ad4bf7c112dbb96e0195fe4d30d53

Code for my website

config: override base_url in development

Alan Pearce
commit

5de16f9e331ad4bf7c112dbb96e0195fe4d30d53

parent

3cd1d0016d90c7390d26f3066e2541852c5b94c0

1 file changed, 5 insertions(+), 1 deletion(-)

jump to
M src/config.tssrc/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;