vue-multiview/server.js

17 lines
348 B
JavaScript
Raw Permalink Normal View History

2020-09-02 13:57:40 +00:00
const sirv = require('sirv');
const polka = require('polka');
const compress = require('compression')();
// Init `sirv` handler
const assets = sirv('dist', {
'maxAge': 31536000, // 1Y
'immutable': true
});
polka()
.use(compress, assets)
.listen(8130, err => {
if (err) throw err;
console.log('> Running on localhost:8130');
});