Changed the server.js file to work with now

This commit is contained in:
2019-06-25 07:21:00 +01:00
parent fd99a131df
commit 28879347b7

View File

@@ -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