mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-21 23:57:30 +00:00
Hopefully support Heroku
This commit is contained in:
parent
138145fa05
commit
6c48bc9d60
1
Procfile
Normal file
1
Procfile
Normal file
@ -0,0 +1 @@
|
||||
web: npm run $(test "$BIBLIOGRAM_ENTRY" = 'assistant' && echo 'assistant' || echo 'start')
|
@ -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
|
||||
|
@ -5,7 +5,7 @@ const constants = require("../lib/constants")
|
||||
const passthrough = require("./passthrough")
|
||||
|
||||
const pinski = new Pinski({
|
||||
port: constants.port,
|
||||
port: +process.env.PORT || constants.port,
|
||||
relativeRoot: __dirname
|
||||
})
|
||||
|
||||
|
@ -5,7 +5,7 @@ const constants = require("../lib/constants")
|
||||
const passthrough = require("./passthrough")
|
||||
|
||||
const pinski = new Pinski({
|
||||
port: constants.port,
|
||||
port: +process.env.PORT || constants.port,
|
||||
relativeRoot: __dirname,
|
||||
basicCacheControl: {
|
||||
exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"],
|
||||
|
Loading…
Reference in New Issue
Block a user