-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
37 lines (25 loc) · 844 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
const express = require('express');
const hbs = require('hbs');
const path = require('path')
const app = express();
const mongoose = require('mongoose');
const bodyParser = require('body-parser')
const routes = require('./src/routes/main');
require('./src/db/conn');
require("dotenv").config();
// models
// const Carousel = require("./models/Carousel");
// const Slider = require("./models/Slider2");
// const Ev_slider = require("./models/Slider3");
// const Movies = require("./models/Movies");
app.use(bodyParser.urlencoded({
extended:true
}))
app.set('view engine', 'hbs')
app.set('views', path.join(__dirname, 'views'));
app.use(express.static(__dirname + '/public'));
hbs.registerPartials("views/partials")
app.use('', routes);
app.listen(process.env.PORT , () => {
console.log(`Application listening at 4400`);
})