Compare commits

..

No commits in common. "ssmp/qotd-18-r6" and "main" have entirely different histories.

2 changed files with 0 additions and 21 deletions

View File

@ -1,11 +0,0 @@
import type { NextFunction, Request, Response } from 'express';
export function errorHandler(
err: unknown,
_req: Request,
res: Response,
_next: NextFunction
): void {
console.error(err);
res.status(500).json({ error: 'Internal server error' });
}

View File

@ -1,10 +0,0 @@
import express from 'express';
import { errorHandler } from './middleware/error';
const app = express();
app.use(express.json());
app.use(errorHandler);
export default app;