Skip to content

Commit

Permalink
Correção no build backend
Browse files Browse the repository at this point in the history
Foi travado a versão do express e convertido o retorno do express.static para express.RequestHandler
  • Loading branch information
willian-rosa committed Nov 4, 2022
1 parent f90247b commit 9346796
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
ssl/
.env
.wwebjs_auth
.idea
4 changes: 3 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"dependencies": {
"@sentry/node": "^5.29.2",
"@types/pino": "^6.3.4",
"@types/express-serve-static-core": "4.17.20",
"@types/express": "4.17.2",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
Expand Down Expand Up @@ -47,7 +49,7 @@
"@types/bluebird": "^3.5.32",
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.7",
"@types/express": "^4.17.13",
"@types/express": "4.17.2",
"@types/factory-girl": "^5.0.2",
"@types/faker": "^5.1.3",
"@types/jest": "^26.0.15",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ app.use(
app.use(cookieParser());
app.use(express.json());
app.use(Sentry.Handlers.requestHandler());
app.use("/public", express.static(uploadConfig.directory));
app.use("/public", express.static(uploadConfig.directory) as express.RequestHandler);
app.use(routes);

app.use(Sentry.Handlers.errorHandler());
Expand Down

0 comments on commit 9346796

Please sign in to comment.