Update package and ts setup.
This commit is contained in:
11
server.ts
11
server.ts
@@ -28,6 +28,17 @@ dotenv.config({
|
||||
path: resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`)
|
||||
});
|
||||
|
||||
// Global error handlers
|
||||
process.on('uncaughtException', (error) => {
|
||||
console.error('Uncaught Exception:', error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', (reason, promise) => {
|
||||
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// Logger setup
|
||||
const commonTransportConfig = {
|
||||
maxSize: "20m",
|
||||
|
||||
Reference in New Issue
Block a user