-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
20 lines (15 loc) · 706 Bytes
/
Copy pathindex.js
File metadata and controls
20 lines (15 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(cors());
const gamesController = require("./games/GamesController"); // USE GAME ROUTER
app.use("/",gamesController);
const usersController = require("./users/UsersController"); // USE USER ROUTER
app.use("/",usersController);
const swaggerUi = require('swagger-ui-express')
const swaggerFile = require("./swagger/swagger_output.json");
app.use('/swagger', swaggerUi.serve, swaggerUi.setup(swaggerFile))
app.listen(3000, () => console.log(`Servidor rodadndo na porta: ${3000}!`));