diff --git a/lib/index.js b/lib/index.js index 26eb086..606bc57 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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 diff --git a/lib/views/about.ejs b/lib/views/about.ejs index 9e3b471..b9200b3 100644 --- a/lib/views/about.ejs +++ b/lib/views/about.ejs @@ -9,6 +9,8 @@ +

Version information

+ <%= version %>

About the project