diff --git a/src/app.ts b/src/app.ts index 28d7419..f8a682b 100644 --- a/src/app.ts +++ b/src/app.ts @@ -14,7 +14,7 @@ import cors from "cors" require("dotenv").config() -const swaggerDocument: object = JSON.parse(readFileSync("openapi.json", "utf8")) +const swaggerDocument: object = JSON.parse(readFileSync(config.openapiFile, "utf8")) const logger = new Logger(true, true) diff --git a/src/config.ts b/src/config.ts index 9f1c35f..ef8fb65 100644 --- a/src/config.ts +++ b/src/config.ts @@ -45,6 +45,7 @@ export default { skipRatelimiters: process.env.SKIPRATELIMITERS == "true", corsEnabled: process.env.ENABLE_CORS == "true", corsAllowed: (process.env.ALLOWED_CORS_ORIGINS || "").split(","), + openapiFile: process.env.PASTEBIN_OPENAPI_SPEC_FILE || "openapi.json", mailerEnabled: process.env.MAIL_ENABLED === "true", getMailer: getMailer,