Doing everything as it is in readme, my server.js:
import sirv from 'sirv';
import polka from 'polka';
import compression from 'compression';
import * as sapper from '@sapper/server';
const {PORT, NODE_ENV} = process.env;
const dev = NODE_ENV === 'development';
const app = polka(); // You can also use Express
polka.use(
compression({threshold: 0}),
sirv('static', {dev}),
sapper.middleware()
)
.listen(PORT, err => {
if (err) console.log('error', err);
});
export default app;
I have 2 warnings in Vercel logs:
20:41:01.773
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
20:41:01.774
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
Doing everything as it is in readme, my server.js:
I have 2 warnings in Vercel logs: