This commit is contained in:
MrFry 2019-10-26 10:11:27 +02:00
commit c9ab102927
7 changed files with 136 additions and 36 deletions

View file

@ -81,7 +81,13 @@ app.use(function (req, res, next) {
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))
})