feat: add version info endpoint and display in UI
All checks were successful
Build and Push Docker Image / build (push) Successful in 35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 35s
This commit is contained in:
11
server.js
11
server.js
@@ -499,6 +499,17 @@ app.get('/api/settings', (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Get version/commit info
|
||||
app.get('/api/version', (req, res) => {
|
||||
const commitHash = process.env.COMMIT_HASH || 'dev';
|
||||
const buildDate = process.env.BUILD_DATE || new Date().toISOString();
|
||||
|
||||
res.json({
|
||||
commit: commitHash,
|
||||
buildDate: buildDate
|
||||
});
|
||||
});
|
||||
|
||||
// Start server
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server is running on http://localhost:${PORT}`);
|
||||
|
||||
Reference in New Issue
Block a user