Skip to content

Commit

Permalink
added cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sowri19 committed Apr 17, 2024
1 parent c6187e2 commit c6ea9fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
import express from "express";
import router from "./routes/routers.mjs";
import serverless from "serverless-http";
import cors from "cors";

const app = express();

// Enable CORS middleware
app.use(cors());

app.use(express.json());
app.use("/", router);

Expand Down
14 changes: 13 additions & 1 deletion package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dependencies": {
"amazon-cognito-identity-js": "^6.3.7",
"aws-sdk": "^2.1030.0",
"cors": "^2.8.5",
"express": "^4.18.2",
"nodemon": "^3.1.0",
"serverless-http": "^3.2.0",
Expand Down

0 comments on commit c6ea9fe

Please sign in to comment.