0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-11 06:52:38 +00:00

Add publicUrl to global.config & update template

This commit is contained in:
G.Ambatte
2022-04-13 19:35:51 +12:00
parent 3ad6f1d794
commit 0e25793f0a
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
module.exports = async(name, title = '', props = {})=>{ module.exports = async(name, title = '', props = {})=>{
const HOMEBREWERY_PUBLIC_URL=props.publicUrl; const HOMEBREWERY_PUBLIC_URL=props.config.publicUrl;
return ` return `
<!DOCTYPE html> <!DOCTYPE html>

View File

@@ -281,11 +281,11 @@ app.use((req, res)=>{
// Create configuration object // Create configuration object
const configuration = { const configuration = {
local : isLocalEnvironment, local : isLocalEnvironment,
publicUrl : config.get('publicUrl') ?? '',
environment : nodeEnv environment : nodeEnv
}; };
const props = { const props = {
version : require('./../package.json').version, version : require('./../package.json').version,
publicUrl : config.get('publicUrl') ?? '',
url : req.originalUrl, url : req.originalUrl,
brew : req.brew, brew : req.brew,
brews : req.brews, brews : req.brews,