-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (29 loc) · 1.07 KB
/
index.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
33
34
35
36
37
const express = require('express');
const clienteRouter = require('./src/routes/api/ClienteApiRoutes');
const oficinaRouter = require('./src/routes/api/OficinaApiRoutes');
const servicoRouter = require('./src/routes/api/ServicoApiRoutes');
const etapaRouter = require('./src/routes/api/EtapaApiRoutes');
const statusRouter = require('./src/routes/api/StatusApiRoutes');
const carroRouter = require('./src/routes/api/CarroApiRoutes');
const marcaRouter = require('./src/routes/api/MarcaApiRoutes');
const enderecoRouter = require('./src/routes/api/EnderecoApiRoutes');
const app = express();
const cors = require('cors');
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({extended:false}));
app.set('view engine', 'ejs');
const port = 4000;
app.use(clienteRouter);
//app.use(servicoRouter);
//app.use(statusRouter);
//app.use(etapaRouter);
app.use(carroRouter);
app.use(marcaRouter);
//app.use(enderecoRouter);
/*app.use(servicoController);
app.use('/', carroController);
app.use('/', marcaController);*/
app.listen(port, () =>{
console.log('Servidor rodando');
});