The namegen5 website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
410 B

4 years ago
  1. import sirv from 'sirv';
  2. import polka from 'polka';
  3. import compression from 'compression';
  4. import * as sapper from '@sapper/server';
  5. const { PORT, NODE_ENV } = process.env;
  6. const dev = NODE_ENV === 'development';
  7. polka() // You can also use Express
  8. .use(
  9. compression({ threshold: 0 }),
  10. sirv('static', { dev }),
  11. sapper.middleware()
  12. )
  13. .listen(PORT, err => {
  14. if (err) console.log('error', err);
  15. });