mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
merge
This commit is contained in:
commit
c9ab102927
7 changed files with 136 additions and 36 deletions
|
@ -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))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue