setup application, server, and configs

This commit is contained in:
ItsMalma
2025-11-03 21:28:16 +07:00
parent 2769bdd894
commit 9aa0de17ee
12 changed files with 182 additions and 17 deletions

20
src/server.ts Normal file
View File

@@ -0,0 +1,20 @@
import { Application } from "@/application";
process.on("uncaughtException", (err) => {
let message = `Uncaught exception: ${err.message || err}`;
if (err.stack) {
message += `\n- Stack: ${err.stack}`;
}
console.warn(message);
});
process.on("unhandledRejection", (reason) => {
console.warn(`Unhandled rejection: ${reason}`);
});
const application = new Application();
application.initializeMiddlewares();
application.initializeRouters();
application.initializeErrorHandlers();
application.run();