-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
39 lines (25 loc) · 911 Bytes
/
app.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
require("dotenv/config")
require("./db")
const express = require("express")
const hbs = require("hbs")
const app = express()
require("./config")(app)
require("./config/session.config")(app)
app.locals.appTitle = `PETROL-END`
app.locals.logoImage = "/images/logo.svg"
//ROUTES
const indexRouter = require("./routes/index.routes");
app.use("/", indexRouter)
const authRouter = require("./routes/auth.routes");
app.use("/", authRouter)
const vehicleRouter = require("./routes/vehicle.routes");
app.use("/vehiculos", vehicleRouter)
const profileRouter = require("./routes/profile.routes");
app.use("/perfil", profileRouter)
const purchaseRouter = require("./routes/purchase.routes");
app.use("/gastos", purchaseRouter)
const adminRouter = require("./routes/admin.routes")
const res = require("express/lib/response")
app.use("/admin", adminRouter)
require("./error-handling")(app)
module.exports = app