add version information to about page
This commit is contained in:
parent
1fbf441317
commit
6022e918bd
|
@ -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
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<h3>Version information</h3>
|
||||
<code><%= version %></code>
|
||||
<h2>About the project</h2>
|
||||
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue