Fix module state detection

This commit is contained in:
Yarmo Mackenbach 2022-11-14 22:07:36 +01:00
parent 751e141f91
commit 67308487b9
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1
2 changed files with 4 additions and 5 deletions

View file

@ -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)
}

View file

@ -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'))