Skip to content

Commit

Permalink
Merge branch 'feature/add-cors-support' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
elias-garcia committed Mar 27, 2020
2 parents d8551cb + 45001d1 commit f54c6de
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"license": "ISC",
"dependencies": {
"axios": "^0.19.2",
"cors": "^2.8.5",
"express": "^4.17.1",
"express-pino-logger": "^4.0.0",
"mongoose": "^5.9.5",
Expand All @@ -24,6 +25,7 @@
"yup": "^0.28.3"
},
"devDependencies": {
"@types/cors": "^2.8.6",
"@types/express": "^4.17.3",
"@types/express-pino-logger": "^4.0.2",
"@types/mongoose": "^5.7.6",
Expand Down
2 changes: 2 additions & 0 deletions server/src/apps/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as express from "express";
import * as expressPino from "express-pino-logger";
import * as cors from "cors";

import { config } from "../../shared/infrastructure/config/config";
import { logger } from "../../shared/infrastructure/logging";
Expand All @@ -15,6 +16,7 @@ function bootstrap(): void {
const app: express.Express = express();

app.use(expressPino({ logger }));
app.use(cors());

app.use("/autonomous-communities", autonomousCommunitiesRouter);
app.use("/reports", reportsRouter);
Expand Down

0 comments on commit f54c6de

Please sign in to comment.