blocklist/server.js

17 lines
350 B
JavaScript
Raw Permalink Normal View History

2020-07-20 12:37:38 +00:00
const sirv = require('sirv');
const polka = require('polka');
const compress = require('compression')();
// Init `sirv` handler
const assets = sirv('public', {
'maxAge': 31536000, // 1Y
'immutable': true
});
polka()
.use(compress, assets)
2020-07-20 12:45:49 +00:00
.listen(8989, err => {
2020-07-20 12:37:38 +00:00
if (err) throw err;
console.log('> Running on localhost:8989');
});