import { handler } from './build/handler.js';
import compression from 'compression';
import polka from 'polka';

const { PORT = 5050, HOST = '0.0.0.0' } = process.env;

polka()
  .use(compression())
  .use(handler)
  .listen({ port: PORT, host: HOST }, () => {
    console.log(`Server with compression listening on http://${HOST}:${PORT}`);
  });
