started integrating auth with lucia

This commit is contained in:
Milo Schwartz 2024-10-01 20:48:03 -04:00
parent a33a8d7367
commit fc5dca136f
No known key found for this signature in database
20 changed files with 1341 additions and 61 deletions

View file

@ -7,6 +7,8 @@ import helmet from "helmet";
import cors from "cors";
import internal from "@server/routers/internal";
import external from "@server/routers/external";
import notFoundMiddleware from "./middlewares/notFound";
import { errorHandlerMiddleware } from "./middlewares/formatError";
const dev = environment.ENVIRONMENT !== "prod";
const app = next({ dev });
@ -34,6 +36,9 @@ app.prepare().then(() => {
logger.info(`Main server is running on http://localhost:${mainPort}`);
});
mainServer.use(notFoundMiddleware);
mainServer.use(errorHandlerMiddleware);
// Internal server
const internalServer = express();
internalServer.use(helmet());