Compare commits
No commits in common. "ssmp/qotd-18-r6" and "main" have entirely different histories.
ssmp/qotd-
...
main
@ -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' });
|
||||
}
|
||||
@ -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;
|
||||
Loading…
Reference in New Issue
Block a user