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:
parent
9c2f1d24ba
commit
30c1c486f6
1 changed files with 107 additions and 112 deletions
|
@ -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}`)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue