-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
97 lines (85 loc) · 2.83 KB
/
index.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
app.use(express.static('public'));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
const page = require('./views/page');
const home = require('./views/home');
const about = require('./views/about');
const contact = require('./views/contact');
const workshops = require('./views/workshops');
const cityscapes = require('./views/cityscapes');
const abstracts = require('./views/abstracts');
const landscapes = require('./views/landscapes');
const acrylics = require('./views/acrylics');
const watercolors = require('./views/watercolors');
// ====================================================
// Serving
// ====================================================
app.listen(9000, () => {
console.log('working');
});
// ====================================================
// Home
// ====================================================
app.get('/', (req, res) => {
const thePage = page(home());
res.send(thePage);
});
// ====================================================
// About Me
// ====================================================
app.get('/about', (req, res) => {
const thePage = page(about());
res.send(thePage);
});
// ====================================================
// Contact
// ====================================================
app.get('/contact', (req, res) => {
const thePage = page(contact());
res.send(thePage);
});
// ====================================================
// Workshops
// ====================================================
app.get('/workshops', (req, res) => {
const thePage = page(workshops());
res.send(thePage);
});
// ====================================================
// Cityscapes
// ====================================================
app.get('/cityscapes', (req, res) => {
const thePage = page(cityscapes());
res.send(thePage);
});
// ====================================================
// Abstracts
// ====================================================
app.get('/abstracts', (req, res) => {
const thePage = page(abstracts());
res.send(thePage);
});
// ====================================================
// Landscapes
// ====================================================
app.get('/landscapes', (req, res) => {
const thePage = page(landscapes());
res.send(thePage);
});
// ====================================================
// Acrylics
// ====================================================
app.get('/acrylics', (req, res) => {
const thePage = page(acrylics());
res.send(thePage);
});
// ====================================================
// Watercolors
// ====================================================
app.get('/watercolors', (req, res) => {
const thePage = page(watercolors());
res.send(thePage);
});