forked from dlstechteaching/devops-01-git-ex-final
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
41 lines (38 loc) · 1.35 KB
/
Copy pathapp.js
File metadata and controls
41 lines (38 loc) · 1.35 KB
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
var express = require('express');
var app = express();
var path = require('path');
var hbs = require('hbs');
const monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
// View Engine Setup
app.set('views', path.join(__dirname))
app.set('view engine', 'hbs')
app.get('/', function (req, res) {
res.render('./views/Home', {
title: 'MA - FM - CD',
cards: [
{
title: 'Our Changing Planet',
author: 'Kurt Wagner',
desc: 'Visit ten places on our planet that are undergoing the biggest changes today',
imageUrl: 'https://material-components.github.io/material-components-web-catalog/static/media/photos/3x2/2.jpg'
},
{
title: 'Our Changing Planet',
author: 'Kurt Wagner',
desc: 'Visit ten places on our planet that are undergoing the biggest changes today',
imageUrl: 'https://material-components.github.io/material-components-web-catalog/static/media/photos/3x2/3.jpg'
},
{
title: 'Our Changing Planet',
author: 'Kurt Wagner',
desc: 'Visit ten places on our planet that are undergoing the biggest changes today',
imageUrl: 'https://material-components.github.io/material-components-web-catalog/static/media/photos/3x2/1.jpg'
}
]
})
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});