-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
22 lines (15 loc) · 809 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const express = require('express')
const connectDB = require('./dB/connection.js')
const app = express();
connectDB();
app.use(express.json({ extended: false }));
app.use('/api/auth',require('./Controllers/loginController'))
app.use('/api/users',require('./Controllers/usersController'))
app.use('/api/membres',require('./Controllers/membresController'))
app.use('/api/municipalites',require('./Controllers/municipalitesController'))
app.use('/api/gouvernorats',require('./Controllers/gouvernoratController'))
app.use('/api/ministeres',require('./Controllers/ministeresController'))
app.use('/api/reunions',require('./Controllers/reunionsController'))
const Port = process.env.Port || 3000
app.listen(Port,() => console.log('server started'))
//app.listen(process.env.PORT || 3000) //Heroku Deployment