diff --git a/post-process.ts b/post-process.ts index 352967e..68a89ce 100644 --- a/post-process.ts +++ b/post-process.ts @@ -9,7 +9,7 @@ export const postProcess = async () => { cname?: string; baseUrl?: string; }; - } = safeLoad(await readFile(join("..", "..", ".upptimerc.yml"), "utf8")) as any; + } = safeLoad(await readFile(join("..", ".upptimerc.yml"), "utf8")) as any; const baseUrl = (config["status-website"] || {}).baseUrl || "/"; execSync(`sapper export --legacy --basepath ${baseUrl}`, { diff --git a/pre-process.ts b/pre-process.ts index e221f2c..600cccf 100644 --- a/pre-process.ts +++ b/pre-process.ts @@ -13,7 +13,7 @@ export const preProcess = async () => { introTitle?: string; introMessage?: string; i18n?: { [index: string]: string }; - } = safeLoad(await readFile(join("..", "..", ".upptimerc.yml"), "utf8")) as any; + } = safeLoad(await readFile(join("..", ".upptimerc.yml"), "utf8")) as any; config.i18n = { ...i18n, ...config.i18n }; await ensureDir(join(".", "src", "data")); diff --git a/src/server.js b/src/server.js index e15c8d5..928d029 100644 --- a/src/server.js +++ b/src/server.js @@ -9,16 +9,7 @@ import { join } from "path"; const { PORT, NODE_ENV } = process.env; const dev = NODE_ENV === "development"; -let config = safeLoad(fs.readFileSync(join(".", ".upptimerc.yml"), "utf8")); -try { - const file = fs.readFileSync(join("..", "..", ".upptimerc.yml"), "utf8"); - if (file) { - config = safeLoad(file); - console.log("Using root config instead", config); - } -} catch (error) { - console.log("Root config not found 2 dirs up"); -} +let config = safeLoad(fs.readFileSync(join("..", ".upptimerc.yml"), "utf8")); const baseUrl = (config["status-website"] || {}).baseUrl || "/"; polka()