diff --git a/exercise3.js b/exercise3.js new file mode 100644 index 0000000..f94d3f7 --- /dev/null +++ b/exercise3.js @@ -0,0 +1,9 @@ +const express = require('express') +const app = express() + +app.set('view engine', 'pug') +app.set('views', process.argv[3]) + +app.get('/home', (req, res) => res.render('index', {date: new Date().toDateString()})) + +app.listen(process.argv[2]) diff --git a/package.json b/package.json index 09bb5ae..522c0f4 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "homepage": "https://github.com/Iggy-Codes/expressworks-nodeschool#readme", "dependencies": { - "express": "^4.14.1" + "express": "^4.14.1", + "pug": "^2.0.0-beta11" } } diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 59a1aa8..0000000 --- a/public/index.html +++ /dev/null @@ -1,9 +0,0 @@ - -
-I am red!
- - \ No newline at end of file diff --git a/public/main.css b/public/main.css deleted file mode 100644 index 23af670..0000000 --- a/public/main.css +++ /dev/null @@ -1 +0,0 @@ -p {color: red;} \ No newline at end of file