-
Notifications
You must be signed in to change notification settings - Fork 1
/
server.js
45 lines (37 loc) · 924 Bytes
/
server.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
41
42
43
44
45
// Load Node modules
var express = require('express');
const ejs = require('ejs');
// Initialise Express
var app = express();
// Render static files
app.use(express.static('public'));
// Set the view engine to ejs
app.set('view engine', 'ejs');
// Port website will run on
app.listen(8082);
// *** GET Routes - display pages ***
// Root Route
app.get('/', function (req, res) {
res.render('index');
});
app.get('/aboutus', function (req, res) {
res.render('about-us');
});
app.get('/celeb', function (req, res) {
res.render('celeb');
});
app.get('/checkout', function (req, res) {
res.render('checkout');
});
app.get('/event', function (req, res) {
res.render('events');
});
app.get('/linkedpage', function (req, res) {
res.render('linked page');
});
app.get('/ourwork', function (req, res) {
res.render('our-work');
});
app.get('/shop', function (req, res) {
res.render('shop');
});