diff --git a/src/api/v2/index.js b/src/api/v2/index.js index 423ef98..1b17e75 100644 --- a/src/api/v2/index.js +++ b/src/api/v2/index.js @@ -33,11 +33,11 @@ import proxyGetApiRouter from './proxy_get.js' const router = express.Router() -if (process.env.ENABLE_MAIN_MODULE === 'true') { +if ((process.env.ENABLE_MAIN_MODULE ?? 'true') === 'true') { router.use('/profile', keyoxideProfileApiRouter) } -console.log(process.env.ENABLE_PROXY_MODULE); -if (process.env.ENABLE_PROXY_MODULE === 'true') { + +if ((process.env.ENABLE_PROXY_MODULE ?? 'true') === 'true') { router.use('/get', proxyGetApiRouter) } diff --git a/src/index.js b/src/index.js index f53aac9..99d45cb 100644 --- a/src/index.js +++ b/src/index.js @@ -73,8 +73,7 @@ app.use(stringReplace({ // Routes app.use('/api', apiRoute) -if (process.env.ENABLE_MAIN_MODULE === 'true') { - console.log("lol", process.env.ENABLE_MAIN_MODULES); +if ((process.env.ENABLE_MAIN_MODULE ?? 'true') === 'true') { app.use('/favicon.svg', express.static('./static/favicon.svg')) app.use('/robots.txt', express.static('./static/robots.txt'))