-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (24 loc) · 778 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
const express = require('express')
const cors = require('cors')
const logger = require('morgan')
const accountRoutes = require('./routers/accountRouter')
const customerRoutes = require('./routers/customerRouter')
const fixerRoutes = require('./routers/fixerRouter')
const itemRoutes = require('./routers/items')
const jobRoutes = require('./routers/jobs')
const app = express()
app.use(cors())
app.use(express.json())
app.use(logger('dev'))
app.get('/', (req, res) => {
res.json({
name: "Florin recycle cafe",
description: "Come and save the environment with us"
})
})
app.use('/accounts', accountRoutes)
app.use('/customers', customerRoutes)
app.use('/fixers', fixerRoutes)
app.use('/items', itemRoutes)
app.use('/jobs', jobRoutes)
module.exports = app