-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (34 loc) · 1.45 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
38
39
40
41
42
const express = require("express");
const cors = require("cors");
const swaggerUi = require("swagger-ui-express");
const swaggerFile = require('./swagger/swagger_output.json');
const app = express();
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
const db = require("./app/models");
// db.sequelize.sync();
app.use('/SwaggerRhBarbearia', swaggerUi.serve, swaggerUi.setup(swaggerFile));
require("./app/routes/agenda.routes")(app);
require("./app/routes/usuario.routes")(app);
require("./app/routes/administrador.routes")(app);
require("./app/routes/cliente.routes")(app);
require("./app/routes/barbeiro.routes")(app);
require("./app/routes/agendamento.routes")(app);
require("./app/routes/fornecedor.routes")(app);
require("./app/routes/insumo.routes")(app);
require("./app/routes/procedimento.routes")(app);
require("./app/routes/insumoProcedimento.routes")(app);
require("./app/routes/procedimentoAgendamento.routes")(app);
require("./app/routes/login.routes")(app);
require("./app/routes/recuperaSenha.routes")(app);
require("./app/routes/atendimento.routes")(app);
require("./app/routes/conta.routes")(app);
require("./app/routes/pagamento.routes")(app);
require("./app/routes/recebimento.routes")(app);
require("./app/routes/statusAtendimento.routes")(app);
require("./app/routes/statusRecebimento.routes")(app);
const PORT = process.env.PORT || 8080;
app.listen(PORT, () => {
console.log(`Servidor rodando ${PORT}.`);
});