add version information to about page

This commit is contained in:
Ondrej Synacek 2019-11-14 08:56:30 +01:00
parent 1fbf441317
commit 6022e918bd
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,8 @@ const limiter = rateLimit({
windowMs: 60 * 1000,
max: 10,
})
const pkg = require('../package.json')
const version = pkg.version || ''
// Force app to always redirect to HTTPS
// use when you can't configure web server
@ -63,7 +65,7 @@ app.get('/error', (req, res) => {
})
app.get('/about', (req, res) => {
res.render('about')
res.render('about', { version })
})
// NOTE: Capture all unkown URLs

View File

@ -9,6 +9,8 @@
</head>
<body>
<h3>Version information</h3>
<code><%= version %></code>
<h2>About the project</h2>
<p>