mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-16 03:54:37 +00:00
Merge branch 'master' of github.com:sveltejs/sapper-template
This commit is contained in:
@@ -4,13 +4,16 @@ import sapper from 'sapper';
|
|||||||
import compression from 'compression';
|
import compression from 'compression';
|
||||||
import { manifest } from './manifest/server.js';
|
import { manifest } from './manifest/server.js';
|
||||||
|
|
||||||
|
const { PORT, NODE_ENV } = process.env;
|
||||||
|
const dev = NODE_ENV === 'development';
|
||||||
|
|
||||||
polka() // You can also use Express
|
polka() // You can also use Express
|
||||||
.use(
|
.use(
|
||||||
compression({ threshold: 0 }),
|
compression({ threshold: 0 }),
|
||||||
sirv('assets'),
|
sirv('assets', { dev }),
|
||||||
sapper({ manifest })
|
sapper({ manifest })
|
||||||
)
|
)
|
||||||
.listen(process.env.PORT)
|
.listen(PORT)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log('error', err);
|
console.log('error', err);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"compression": "^1.7.1",
|
"compression": "^1.7.1",
|
||||||
"polka": "^0.4.0",
|
"polka": "^0.4.0",
|
||||||
"sapper": "^0.17.0",
|
"sapper": "^0.17.0",
|
||||||
"sirv": "^0.1.1"
|
"sirv": "^0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"npm-run-all": "^4.1.2",
|
"npm-run-all": "^4.1.2",
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const posts = [
|
|||||||
title: 'How can I get involved?',
|
title: 'How can I get involved?',
|
||||||
slug: 'how-can-i-get-involved',
|
slug: 'how-can-i-get-involved',
|
||||||
html: `
|
html: `
|
||||||
<p>We're so glad you asked! Come on over to the <a href='https://github.com/sveltejs/svelte'>Svelte</a> and <a href='https://github.com/sveltejs/sapper'>Sapper</a> repos, and join us in the <a href='https://gitter.im/sveltejs/svelte'>Gitter chatroom</a>. Everyone is welcome, especially you!</p>
|
<p>We're so glad you asked! Come on over to the <a href='https://github.com/sveltejs/svelte'>Svelte</a> and <a href='https://github.com/sveltejs/sapper'>Sapper</a> repos, and join us in the <a href='https://discord.gg/yy75DKs'>Discord chatroom</a>. Everyone is welcome, especially you!</p>
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user