import express from 'express';
import cors from 'cors';
import { registerRoutes } from './routes';

export function createApp(): express.Express {
  const app = express();

  app.set('trust proxy', true);
  app.use(cors());
  app.use(express.json());

  registerRoutes(app);

  return app;
}
