Skip to content

Commit

Permalink
cors added ✅
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeManSu committed Jul 9, 2024
1 parent 75337bc commit f445107
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
31 changes: 31 additions & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
"license": "ISC",
"dependencies": {
"@prisma/client": "^5.16.1",
"cors": "^2.8.5",
"express": "^4.19.2",
"pg": "^8.12.0",
"prisma": "^5.16.1"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.9",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import express, { Request, Response } from 'express';
import errorHandlerMiddleware from './middlewares/errorHandler';
import cors from 'cors';

const app = express();

const port = 8082;

app.use(cors());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

Expand Down

0 comments on commit f445107

Please sign in to comment.