1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-01 18:31:35 +00:00

Hopefully support Heroku

This commit is contained in:
Cadence Ember 2020-04-15 02:03:38 +12:00
parent 138145fa05
commit 6c48bc9d60
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
4 changed files with 10 additions and 4 deletions

View file

@ -127,6 +127,11 @@ let constants = {
// Override values from config and export the result
const md = require("mixin-deep")
const config = require("../../config")
constants = md(constants, config)
if (process.env.BIBLIOGRAM_CONFIG) { // presence of environment variable BIBLIOGRAM_CONFIG overrides /config.js
const config = JSON.parse(process.env.BIBLIOGRAM_CONFIG)
constants = md(constants, config)
} else {
const config = require("../../config")
constants = md(constants, config)
}
module.exports = constants