Skip to content

Commit

Permalink
refactor!: add cors
Browse files Browse the repository at this point in the history
  • Loading branch information
koikiss-dev committed May 7, 2023
1 parent 91f05ab commit 16ce9ee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
21 changes: 21 additions & 0 deletions 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 @@ -38,6 +38,7 @@
"@types/cheerio": "^0.22.31",
"axios": "^1.3.4",
"cheerio": "^1.0.0-rc.12",
"cors": "^2.8.5",
"express": "^4.18.2",
"helmet": "^6.0.1",
"morgan": "^1.10.0",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import tioanime from './routes/v1/anime/tioanime/TioAnimeRoute'
import comick from "./routes/v1/manga/comick/ComickRoutes";
import nhentai from "./routes/v1/manga/nhentai/NhentaiRoutes"
import helmet from "helmet";

import cors from 'cors'
const app = express();
const port = process.env.PORT || 3000;

Expand All @@ -22,6 +22,7 @@ app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(morgan("dev"));
app.use(helmet());
app.use(cors())

//routes

Expand Down

0 comments on commit 16ce9ee

Please sign in to comment.