Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SESSION_SECRET=your_strong_random_secret_here
MONGO_URI=mongodb://localhost:27017/github_tracker
PORT=5000
CLIENT_URL=http://localhost:5173
5 changes: 4 additions & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const logger = require('./logger');
const app = express();

// CORS configuration
app.use(cors('*'));
app.use(cors({
origin: process.env.CLIENT_URL || 'http://localhost:5173',
credentials: true,
}));

// Middleware
app.use(bodyParser.json());
Expand Down
Loading