mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-19 04:55:18 +00:00
Merge branch 'master' into fix/polka
This commit is contained in:
@@ -4,12 +4,15 @@ import sapper from 'sapper';
|
||||
import compression from 'compression';
|
||||
import { manifest } from './manifest/server.js';
|
||||
|
||||
const { PORT, NODE_ENV } = process.env;
|
||||
const dev = NODE_ENV === 'development';
|
||||
|
||||
polka() // You can also use Express
|
||||
.use(
|
||||
compression({ threshold: 0 }),
|
||||
sirv('assets'),
|
||||
sirv('assets', { dev }),
|
||||
sapper({ manifest })
|
||||
)
|
||||
.listen(process.env.PORT, err => {
|
||||
.listen(PORT, err => {
|
||||
if (err) console.log('error', err);
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user