We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1f2f35c + 64c1064 commit 45a5923Copy full SHA for 45a5923
2 files changed
backend/.env.example
@@ -0,0 +1,4 @@
1
+SESSION_SECRET=your_strong_random_secret_here
2
+MONGO_URI=mongodb://localhost:27017/github_tracker
3
+PORT=5000
4
+CLIENT_URL=http://localhost:5173
backend/server.js
@@ -15,7 +15,10 @@ const logger = require('./logger');
15
const app = express();
16
17
// CORS configuration
18
-app.use(cors('*'));
+app.use(cors({
19
+ origin: process.env.CLIENT_URL || 'http://localhost:5173',
20
+ credentials: true,
21
+}));
22
23
// Middleware
24
app.use(bodyParser.json());
0 commit comments