Skip to content

Commit f87c62f

Browse files
Added Cors and changed port to 8000
1 parent 1a0a7ac commit f87c62f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
"eslint-plugin-prettier": "^3.4.0",
2525
"husky": "4",
2626
"prettier": "^2.2.1",
27-
"typescript": "^4.2.4",
28-
"sequelize-cli": "^6.2.0"
27+
"sequelize-cli": "^6.2.0",
28+
"typescript": "^4.2.4"
2929
},
3030
"dependencies": {
31+
"cors": "^2.8.5",
3132
"express": "^4.17.1",
3233
"sequelize": "^6.6.2",
3334
"socket.io": "^4.0.1",

src/app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import express from 'express';
2+
import cors from 'cors';
23

34
import { createSlug } from './controllers/slugController';
45

56
const app = express();
6-
const port = 3000;
7+
const port = 8000;
8+
9+
app.use(cors());
710

811
app.get('/', (_, res) => {
912
res.send('The sedulous hyena ate the antelope!');

0 commit comments

Comments
 (0)