-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
36 lines (35 loc) · 967 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
const express = require('express');
const rootDir = require('./util/path');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.set('view engine', 'ejs'); // templating engine used here is ejs
app.set('views', 'views');
app.get('/', (req, res, next) => {
res.render('index');
});
app.get('/about', (req, res, next) => {
res.render('about');
});
app.get('/blog', (req, res, next) => {
res.render('blog');
});
app.get('/cause_details', (req, res, next) => {
res.render('cause_details');
});
app.get('/cause', (req, res, next) => {
res.render('cause');
});
app.get('/contact', (req, res, next) => {
res.render('contact');
});
app.get('/elements', (req, res, next) => {
res.render('elements');
});
app.get('/main', (req, res, next) => {
res.render('main');
});
app.get('/single-blog', (req, res, next) => {
res.render('single-blog');
});
app.listen(80);