add version endpoint and version logging
Node.js CI / build (push) Successful in 3m22s

This commit is contained in:
2025-07-17 14:44:26 +02:00
parent fc3a4bb7ba
commit fcd08cbaac
5 changed files with 33 additions and 1 deletions
+3 -1
View File
@@ -2,6 +2,7 @@ const express = require('express');
const helmet = require('helmet');
const app = express();
const PORT = process.env.PORT || 3000;
const version = require('./lib/version').version();
const api = require('./api');
@@ -12,5 +13,6 @@ app.use(helmet({
app.use('/', api.router);
app.listen(PORT, () => {
console.log(`🚀 Badge API running at http://localhost:${PORT}/`);
console.log(`[ ${new Date()} ] [ 🚀 BadgeDex version: ${version} ]`);
console.log(`[ ${new Date()} ] [ 🚀 BadgeDex API running at http://localhost:${PORT}/ ]`);
});