12345678910111213141516 |
- // app.js
- const express = require('express');
- const bodyParser = require('body-parser');
- const apiRoutes = require('./routes/apiRoutes');
- const cors = require('cors');
- const app = express();
- const PORT = process.env.PORT || 3000;
- app.use(bodyParser.json());
- app.use(cors());
- app.use('/api', apiRoutes);
- app.listen(PORT, () => {
- console.log(`Server is running on port ${PORT}`);
- });
|