-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.js
28 lines (19 loc) · 791 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
var express = require('express');
var app = express();
var bodyparser = require('body-parser');
// mongoose.connect('mongodb://localhost/covid19', {useNewUrlParser: true,useUnifiedTopology: true}).then(() => {
// console.log("Connected to Database");
// }).catch((err) => {
// console.log("Not Connected to Database ERROR! ", err);
// });
app.use(express.static("public"));
app.set("view engine", "ejs");
app.use(bodyparser.urlencoded({extended:true}));
var pageRoutes = require('./routes/index');
var worldcovid = require('./routes/worldcovid');
var indiacovid = require('./routes/indiacovid');
app.use(pageRoutes);
app.use(worldcovid);
app.use(indiacovid);
var PORT = process.env.PORT || 5000;
app.listen(PORT, () => console.log("Server is running on " + PORT));