Skip to content

Commit

Permalink
use cors
Browse files Browse the repository at this point in the history
  • Loading branch information
camden11 committed Oct 3, 2023
1 parent 060b9f6 commit d5ce5cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/PortManagerServer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import express, { Express, Request, Response } from 'express';
import { Server } from 'http';
import cors from 'cors';

import { detectPort } from '../utils/detectPort';
import {
Expand Down Expand Up @@ -27,6 +28,7 @@ class PortManagerServer {
}
this.app = express();
this.app.use(express.json());
this.app.use(cors());
this.setupRoutes();
this.server = this.app.listen(PORT_MANAGER_SERVER_PORT, () =>
console.log('Running port manager')
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/content-disposition": "^0.5.5",
"@types/cors": "^2.8.14",
"@types/debounce": "^1.2.1",
"@types/express": "^4.17.18",
"@types/findup-sync": "^4.0.2",
"@types/fs-extra": "^11.0.1",
"@types/jest": "^29.5.0",
Expand All @@ -58,11 +60,11 @@
"./portManager": "./lib/portManager.js"
},
"dependencies": {
"@types/express": "^4.17.18",
"address": "^2.0.1",
"axios": "^1.3.5",
"chokidar": "^3.5.3",
"content-disposition": "^0.5.4",
"cors": "^2.8.5",
"express": "^4.18.2",
"extract-zip": "^2.0.1",
"findup-sync": "^5.0.0",
Expand Down

0 comments on commit d5ce5cd

Please sign in to comment.