2021-07-25 17:44:11 +03:00
|
|
|
import dotenv from 'dotenv';
|
|
|
|
|
|
2020-12-24 20:32:05 +02:00
|
|
|
import sirv from 'sirv';
|
|
|
|
|
import polka from 'polka';
|
|
|
|
|
import compression from 'compression';
|
|
|
|
|
import * as sapper from '@sapper/server';
|
|
|
|
|
|
2021-07-27 22:18:23 +03:00
|
|
|
import config from './config';
|
2020-12-24 20:32:05 +02:00
|
|
|
|
|
|
|
|
polka() // You can also use Express
|
2021-07-25 17:44:11 +03:00
|
|
|
.use(
|
|
|
|
|
compression({ threshold: 0 }),
|
|
|
|
|
sirv('static', { dev: true }),
|
|
|
|
|
sapper.middleware()
|
|
|
|
|
)
|
|
|
|
|
.listen(config.port, (err) => {
|
|
|
|
|
if (err) console.log('error', err);
|
|
|
|
|
});
|