// eslint-disable-next-line @typescript-eslint/no-require-imports
const { createServer } = require("http");
// eslint-disable-next-line @typescript-eslint/no-require-imports
const next = require("next");

const app = next({
  dev: false,
});

const handle = app.getRequestHandler();

const port = process.env.PORT || 3001;

app.prepare().then(() => {
  createServer((req, res) => {
    handle(req, res);
  }).listen(port, () => {
    console.log(`Ready on http://localhost:${port}`);
  });
});
