mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 16:17:29 +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
|
// Override values from config and export the result
|
||||||
const md = require("mixin-deep")
|
const md = require("mixin-deep")
|
||||||
const config = require("../../config")
|
if (process.env.BIBLIOGRAM_CONFIG) { // presence of environment variable BIBLIOGRAM_CONFIG overrides /config.js
|
||||||
constants = md(constants, config)
|
const config = JSON.parse(process.env.BIBLIOGRAM_CONFIG)
|
||||||
|
constants = md(constants, config)
|
||||||
|
} else {
|
||||||
|
const config = require("../../config")
|
||||||
|
constants = md(constants, config)
|
||||||
|
}
|
||||||
module.exports = constants
|
module.exports = constants
|
||||||
|
@ -5,7 +5,7 @@ const constants = require("../lib/constants")
|
|||||||
const passthrough = require("./passthrough")
|
const passthrough = require("./passthrough")
|
||||||
|
|
||||||
const pinski = new Pinski({
|
const pinski = new Pinski({
|
||||||
port: constants.port,
|
port: +process.env.PORT || constants.port,
|
||||||
relativeRoot: __dirname
|
relativeRoot: __dirname
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ const constants = require("../lib/constants")
|
|||||||
const passthrough = require("./passthrough")
|
const passthrough = require("./passthrough")
|
||||||
|
|
||||||
const pinski = new Pinski({
|
const pinski = new Pinski({
|
||||||
port: constants.port,
|
port: +process.env.PORT || constants.port,
|
||||||
relativeRoot: __dirname,
|
relativeRoot: __dirname,
|
||||||
basicCacheControl: {
|
basicCacheControl: {
|
||||||
exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"],
|
exts: ["ttf", "woff2", "png", "jpg", "jpeg", "svg", "gif", "webmanifest", "ico"],
|
||||||
|
Loading…
Reference in New Issue
Block a user