mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-22 14:35:20 +00:00
Changed the server.js file to work with now
This commit is contained in:
@@ -6,7 +6,7 @@ import * as sapper from '@sapper/server';
|
|||||||
const { PORT, NODE_ENV } = process.env;
|
const { PORT, NODE_ENV } = process.env;
|
||||||
const dev = NODE_ENV === 'development';
|
const dev = NODE_ENV === 'development';
|
||||||
|
|
||||||
polka() // You can also use Express
|
const app = polka() // You can also use Express
|
||||||
.use(
|
.use(
|
||||||
compression({ threshold: 0 }),
|
compression({ threshold: 0 }),
|
||||||
sirv('static', { dev }),
|
sirv('static', { dev }),
|
||||||
@@ -15,3 +15,5 @@ polka() // You can also use Express
|
|||||||
.listen(PORT, err => {
|
.listen(PORT, err => {
|
||||||
if (err) console.log('error', err);
|
if (err) console.log('error', err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export default app.handler
|
||||||
Reference in New Issue
Block a user