1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-22 20:51:21 +00:00

fix for server

This commit is contained in:
Yusuf Yilmaz 2022-06-02 12:27:43 +02:00
parent 9c2f1d24ba
commit 30c1c486f6

View file

@ -20,15 +20,9 @@ if (config.logging) {
addLogging(config)
}
let documentHandler: DocumentHandler
buildDocumenthandler(config).then((handler) => {
documentHandler = handler
})
buildDocumenthandler(config).then((documentHandler: DocumentHandler) => {
// Compress the static javascript assets
if (config.recompressStaticAssets) {
const list = fs.readdirSync(getStaticDirectory(__dirname))
for (let j = 0; j < list.length; j += 1) {
const item = list[j]
@ -140,3 +134,4 @@ app.use(
app.listen(config.port, config.host, () => {
winston.info(`listening on ${config.host}:${config.port}`)
})
})