Spaces:
Sleeping
Sleeping
| const express = require('express'); | |
| const cors = require('cors'); | |
| const dotenv = require('dotenv'); | |
| const path = require('path'); | |
| const negotiateRoutes = require('./routes/negotiate'); | |
| dotenv.config(); | |
| const app = express(); | |
| const PORT = process.env.PORT || 3008; | |
| app.use(cors()); | |
| app.use(express.json()); | |
| app.use('/api/negotiate', negotiateRoutes); | |
| app.get('/api/health', (req, res) => res.json({ status: 'ok', service: 'negotiation-sim' })); | |
| app.use(express.static(path.join(__dirname, 'public'))); | |
| app.get('*', (req, res) => res.sendFile(path.join(__dirname, 'public', 'index.html'))); | |
| app.listen(PORT, () => console.log(`Negotiation Simulator running on port ${PORT}`)); | |