Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
const files = {}
middlewares.splice(
1,
0,
compress(),
serve(
resolve('dist/static'),
{
maxAge: MAX_AGE,
},
files,
),
cash({
get: key => cache.get(key),
set: (key, value) => cache.set(key, value),
}),
)
files['/service-worker.js'].maxAge = 0
}
app.use(compose(middlewares))
app.listen(serverPort, serverHost, () => {
debug(`Server start listening at %s:%s`, serverHost, serverPort)
})