1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-01 11:31:22 +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) addLogging(config)
} }
let documentHandler: DocumentHandler buildDocumenthandler(config).then((documentHandler: DocumentHandler) => {
buildDocumenthandler(config).then((handler) => {
documentHandler = handler
})
// Compress the static javascript assets // Compress the static javascript assets
if (config.recompressStaticAssets) { if (config.recompressStaticAssets) {
const list = fs.readdirSync(getStaticDirectory(__dirname)) const list = fs.readdirSync(getStaticDirectory(__dirname))
for (let j = 0; j < list.length; j += 1) { for (let j = 0; j < list.length; j += 1) {
const item = list[j] const item = list[j]
@ -140,3 +134,4 @@ app.use(
app.listen(config.port, config.host, () => { app.listen(config.port, config.host, () => {
winston.info(`listening on ${config.host}:${config.port}`) winston.info(`listening on ${config.host}:${config.port}`)
}) })
})