add version deamons

This commit is contained in:
Ashley 2022-11-16 11:27:48 +01:00
parent e3f15542b1
commit 374d77970a

View file

@ -20,6 +20,19 @@ const {
const pkg = require("../../../package.json"); const pkg = require("../../../package.json");
const ver = "v22.1116-co21-stable"
const response = {
pt_version: ver,
packages: {
libpt: version,
node: process.version,
v8: process.versions.v8,
},
process: process.versions,
dependencies: pkg.dependencies,
};
module.exports = function (app, config, renderTemplate) { module.exports = function (app, config, renderTemplate) {
app.get("/embed/:v", async function (req, res) { app.get("/embed/:v", async function (req, res) {
var e = req.query.e; var e = req.query.e;
@ -113,17 +126,6 @@ module.exports = function (app, config, renderTemplate) {
}); });
app.get("/api/version.json", async (req, res) => { app.get("/api/version.json", async (req, res) => {
const response = {
pt_version: "v22.1115-abU9-stable",
packages: {
libpt: version,
node: process.version,
v8: process.versions.v8,
},
process: process.versions,
dependencies: pkg.dependencies,
};
res.json(response); res.json(response);
}); });
@ -138,3 +140,5 @@ module.exports = function (app, config, renderTemplate) {
res.json(f); res.json(f);
}); });
}; };
module.exports.api = ver;