mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Global site url source
This commit is contained in:
parent
61c71e6c8d
commit
d841e464f5
7 changed files with 37 additions and 17 deletions
|
@ -68,7 +68,13 @@ const app = express()
|
|||
Object.keys(modules).forEach(function (k, i) {
|
||||
let x = modules[k]
|
||||
try {
|
||||
x.app = require(x.path).app
|
||||
let mod = require(x.path)
|
||||
if (mod.setup) {
|
||||
mod.setup({
|
||||
url: 'http://' + x.urls[0] // TODO http https or neither
|
||||
})
|
||||
}
|
||||
x.app = mod.app
|
||||
x.urls.forEach((url) => {
|
||||
app.use(vhost(url, x.app))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue