mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-23 20:24:34 +02:00
started integrating auth with lucia
This commit is contained in:
parent
a33a8d7367
commit
fc5dca136f
20 changed files with 1341 additions and 61 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue