mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
merge
This commit is contained in:
@@ -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))
|
||||
})
|
||||
|
Reference in New Issue
Block a user