-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
32 lines (25 loc) · 788 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const { response } = require('express');
const express = require('express');
const cors = require('cors')
const app = express();
const PORT = 3001;
const gameRoute = require('./routes/Game')
const cartRoute = require('./routes/Cart')
const rentRoute = require('./routes/Rent')
const sellRoute = require('./routes/Sell')
const stockRoute = require('./routes/Stock')
const userRoute = require('./routes/User')
app.use(express.json())
app.use(cors());
app.use('/api/game',gameRoute)
app.use('/api/cart',cartRoute)
app.use('/api/rent',rentRoute)
app.use('/api/sell',sellRoute)
app.use('/api/stock',stockRoute)
app.use('/api/user',userRoute)
app.get('/', (req, res) => {
res.send('Hello World!')
});
app.listen(PORT, () => {
console.log(`Example app listening on port ${PORT}!`)
});