mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 14:12:40 +00:00
Add publicUrl as configuration item
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
module.exports = async(name, title = '', props = {})=>{
|
||||
const HOMEBREWERY_PUBLIC_URL=(process.env.NODE_ENV == 'local' ? 'localhost:8000' : 'https://homebrewery.naturalcrit.com');
|
||||
const HOMEBREWERY_PUBLIC_URL=(props.publicUrl ? props.publicUrl : 'https://homebrewery.naturalcrit.com');
|
||||
|
||||
return `
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"naturalcrit_url" : "local.naturalcrit.com:8010",
|
||||
"secret" : "secret",
|
||||
"web_port" : 8000,
|
||||
"enable_v3" : true
|
||||
"enable_v3" : true,
|
||||
"publicUrl" : "localhost:8000"
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@ const templateFn = require('./../client/template.js');
|
||||
app.use((req, res)=>{
|
||||
const props = {
|
||||
version : require('./../package.json').version,
|
||||
publicUrl : config.get('publicUrl'),
|
||||
url : req.originalUrl,
|
||||
brew : req.brew,
|
||||
brews : req.brews,
|
||||
|
||||
Reference in New Issue
Block a user