-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
36 lines (26 loc) · 937 Bytes
/
app.js
File metadata and controls
36 lines (26 loc) · 937 Bytes
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
33
34
35
36
//var compression = require('compression');
const control_db = require('./src/config/index');
const express = require('express');
const router = express.Router();
const bodyParser = require("body-parser");
const app = express();
//Rotas
const index = require('./src/routes/index');
const alumnoRoute = require('./src/routes/alumnoRoute');
const carreraRoute = require('./src/routes/carreraRoute');
const materiaRoute = require('./src/routes/materiaRoute');
const materiaCursadaRoute = require('./src/routes/materiaCursadaRoute');
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.use('/', index);
app.use('/alumno', alumnoRoute);
app.use('/carrera', carreraRoute);
app.use('/materia', materiaRoute);
app.use('/materia_cursada', materiaCursadaRoute);
module.exports = app;
app.set('port', 3000);
app.listen(app.get('port'), function () {
console.log('app listening on port 3000!');
});