Skip to content

Commit

Permalink
feat: show server version
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 21, 2021
1 parent 80b0e81 commit 7b3eff7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path');
const lowdb = require('lowdb');
const FileSync = require('lowdb/adapters/FileSync');

const pjson = require('../package.json');
const scrapSite = require("./scrap-site");
const registry = require("./registry");
const utils = require("./utils");
Expand Down Expand Up @@ -168,6 +169,7 @@ function serverState() {
scansTotalAll: stats.scansTotal || 0,
pagesTotalAll: stats.pagesTotal || 0,
uptime: Math.floor((Date.now() - startedTime) / 1000),
serverVersion: pjson.version,
reboots: reboots,
}
}
Expand Down Expand Up @@ -277,7 +279,7 @@ function initExpress(app) {
app.use("/reports", express.static("data/reports"));

app.get("/", async (req, res) => {
res.send("site-audit-seo working");
res.send(`site-audit-seo ${pjson.version} working`);
});

const port = process.env.PORT || 5301;
Expand Down

0 comments on commit 7b3eff7

Please sign in to comment.