mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Moved public dirs to seperate directories
This commit is contained in:
parent
fe580747d6
commit
4e22b94b5d
9 changed files with 59 additions and 14 deletions
|
@ -52,6 +52,7 @@ const daysAfterUserGetsPWs = 2 // days after user gets pw-s
|
|||
|
||||
let userDB
|
||||
let url
|
||||
let publicdirs = []
|
||||
|
||||
function GetApp () {
|
||||
app.use(bodyParser.urlencoded({
|
||||
|
@ -79,7 +80,10 @@ function GetApp () {
|
|||
'/badtestsender'
|
||||
]
|
||||
}))
|
||||
app.use(express.static('public'))
|
||||
publicdirs.forEach((pdir) => {
|
||||
logger.Log(`Using public dir: ${pdir}`)
|
||||
app.use(express.static(pdir))
|
||||
})
|
||||
app.use(busboy({
|
||||
limits: {
|
||||
fileSize: 50000 * 1024 * 1024
|
||||
|
@ -653,4 +657,5 @@ exports.getApp = GetApp
|
|||
exports.setup = (data) => {
|
||||
userDB = data.userDB
|
||||
url = data.url
|
||||
publicdirs = data.publicdirs
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue