Skip to content

Commit 95ca987

Browse files
Upgrade Express to v5 (#52)
1 parent 0ed864e commit 95ca987

File tree

7 files changed

+194
-218
lines changed

7 files changed

+194
-218
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"bcryptjs": "3.0.2",
3030
"cors": "2.8.5",
3131
"dotenv": "16.4.7",
32-
"express": "4.21.2",
33-
"express-async-errors": "3.1.1",
32+
"express": "5.1.0",
3433
"helmet": "8.1.0",
3534
"inversify": "7.5.0",
3635
"jsonwebtoken": "9.0.2",
@@ -48,7 +47,7 @@
4847
"@stylistic/eslint-plugin": "4.2.0",
4948
"@types/bcryptjs": "3.0.0",
5049
"@types/cors": "2.8.17",
51-
"@types/express": "4.17.21",
50+
"@types/express": "5.0.1",
5251
"@types/jest": "29.5.14",
5352
"@types/jsonwebtoken": "9.0.9",
5453
"@types/morgan": "1.9.9",

src/app/routers/api-router.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { inject, injectable } from 'inversify';
2-
import 'express-async-errors';
32

43
import { BaseRouter } from '@/app/routers/base-router';
54
import { ROUTERS_DI_TYPES } from '@/container/routers/di-types';

src/app/routers/auth-router.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { inject, injectable } from 'inversify';
2-
import 'express-async-errors';
32

43
import { BaseRouter } from '@/app/routers/base-router';
54
import { REQUEST_HANDLERS_DI_TYPES } from '@/container/request-handlers/di-types';

src/app/routers/health-router.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { inject, injectable } from 'inversify';
2-
import 'express-async-errors';
32

43
import { BaseRouter } from '@/app/routers/base-router';
54
import { REQUEST_HANDLERS_DI_TYPES } from '@/container/request-handlers/di-types';

src/app/routers/users-router.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { inject, injectable } from 'inversify';
2-
import 'express-async-errors';
32

43
import { BaseRouter } from '@/app/routers/base-router';
54
import { REQUEST_HANDLERS_DI_TYPES } from '@/container/request-handlers/di-types';

src/app/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const createServer = (container: Container) => {
3636

3737
// This is the last request middleware, if no other middleware handled the request, it means
3838
// the route is not found, so we throw a not found error
39-
app.get('/*', (req, res) => {
39+
app.get('/{*splat}', (req, res) => {
4040
throw HttpError.notFound('Resource not found');
4141
});
4242

0 commit comments

Comments
 (0)