mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-11 10:28:15 +00:00
started integrating auth with lucia
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user