change some files

This commit is contained in:
2026-06-02 17:07:20 +03:30
parent 608fee2ba0
commit 09a34cd435
25 changed files with 622 additions and 104 deletions

View File

@@ -19,7 +19,7 @@ const express = require("express") as typeof import("express");
dotenv.config();
export default class ServerApplication {
#PORT = 4000;
#PORT = 5000;
#APP = express();
constructor() {
this.serverConfiguration();
@@ -47,8 +47,6 @@ export default class ServerApplication {
await initDB();
// await seedRBAC();
this.#APP.listen(this.#PORT, () => {
console.log(
`Server Running on PORT ${this.#PORT} url : ${"http://localhost:"}${
@@ -64,11 +62,12 @@ export default class ServerApplication {
// this.#APP.get("/", (req, res) => res.send(""));
this.#APP.use("/api/v1", mainRouter);
}
ErrorHandlingConfiguration() {
this.#APP.use((req: any, res: Response, next: NextFunction) => {
next(createHttpError.NotFound("این آدرس یافت نشد"));
console.log("dasdadasd");
next(createHttpError.NotFound("این آدرس یافت نشddد"));
});
this.#APP.use(
async (error: any, req: any, res: ServerResponse, next: NextFunction) => {