diff --git a/web-server/public/about.html b/web-server/public/about.html
new file mode 100644
index 0000000..2ed79d1
--- /dev/null
+++ b/web-server/public/about.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+ About
+
+
diff --git a/web-server/public/help.html b/web-server/public/help.html
new file mode 100644
index 0000000..463d2e5
--- /dev/null
+++ b/web-server/public/help.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Help
+
+
diff --git a/web-server/public/index.html b/web-server/public/index.html
new file mode 100644
index 0000000..e5c7b82
--- /dev/null
+++ b/web-server/public/index.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+ From a static file
+
+
diff --git a/web-server/src/app.js b/web-server/src/app.js
index 63a70ef..adce4e6 100644
--- a/web-server/src/app.js
+++ b/web-server/src/app.js
@@ -1,27 +1,15 @@
+const path = require('path')
const express = require('express')
+
const app = express()
+const publicDirectoryPath = path.join(__dirname, '../public')
-app.get('', (req, res) => {
- res.send('Weather
')
-})
-
-app.get('/help', (req, res) => {
- res.send([{
- name: 'Jason',
- age: 38
- }, {
- name: 'Sarah'
- }])
-})
-
-app.get('/about', (req, res) => {
- res.send('About
')
-})
+app.use(express.static(publicDirectoryPath))
app.get('/weather', (req, res) => {
res.send({
- location: 'Calgary',
- forecast: 'It\'s snowing. It\'s really gross out.'
+ forecast: 'It\'s snowing. It\'s really gross out.',
+ location: 'Calgary'
})
})