multiview/server.js
Martin Donnelly e8de544ece init
2020-05-26 21:59:25 +01:00

17 lines
344 B
JavaScript

const sirv = require('sirv');
const polka = require('polka');
const compress = require('compression')();
// Init `sirv` handler
const assets = sirv('live', {
maxAge: 31536000, // 1Y
immutable: true
});
polka()
.use(compress, assets)
.listen(8130, err => {
if (err) throw err;
console.log(`> Running on localhost:8130`);
});