-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
40 lines (28 loc) · 902 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
40
require("dotenv").config();
const hbs = require("hbs");
const flash = require("connect-flash");
const path = require("path")
hbs.registerPartials(path.join(__dirname, 'views', 'partials'))
// Database
require("./configs/mongoose.config");
// Debugger
require('./configs/debugger.config')
// App
const express = require("express");
const app = express();
// Middleware Setup
require('./configs/middleware.config')(app)
// Express View engine setup
require('./configs/preformatter.config')(app)
require('./configs/views.config')(app)
require('./configs/locals.config')(app)
//Spotify
require('./configs/spotify.config')
app.use(flash());
require("./passport")(app);
// Routes
app.use("/", require("./routes/index.routes"));
app.use("/", require("./routes/auth.routes"));
app.use("/", require("./routes/heroes.routes"));
app.use("/", require("./routes/battles.routes"));
module.exports = app;