-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.js
More file actions
38 lines (27 loc) · 1.02 KB
/
routes.js
File metadata and controls
38 lines (27 loc) · 1.02 KB
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
const express = require('express')
const route = express.Router()
//Buscando os controles para controlar nossas rotas...
const homeController = require('./src/controllers/homeController')
const loginController = require('./src/controllers/loginController')
const cadastroController = require('./src/controllers/cadastroController')
/*
~ SEM OS CONTROLLERS
route.get('/', (req, res) =>{
res.send('Tela Inicial')
})
~ COM OS CONTROLLERS
route.get('/', homeController.index)
*/
/***************************************************
ROTAS
****************************************************/
//Rotas da Home
route.get('/', homeController.index)
//Rotas de Login
route.get('/login/index', loginController.index)
route.post('/login/register', loginController.register)
route.post('/login/login', loginController.login)
route.get('/login/logout', loginController.logout)
//Rotas de Cadastro
route.get('/cadastro/index', cadastroController.index)
module.exports = route