ddfe99f9f2
- Go Live Checklist for LandveX Internal Pilot deployment - Version endpoint: /version returns environment, version, commit, build - Ready for Internal Pilot deployment Next: Deploy with Docker Compose
24 lines
490 B
TypeScript
24 lines
490 B
TypeScript
/**
|
|
* Version endpoint
|
|
*
|
|
* Returns current version, commit SHA, and build info.
|
|
* Used by Readiness Dashboard and debugging.
|
|
*/
|
|
|
|
import { Router } from 'express';
|
|
|
|
const router = Router();
|
|
|
|
const VERSION = {
|
|
environment: process.env.NODE_ENV || 'development',
|
|
version: process.env.npm_package_version || '0.1.0',
|
|
commit: process.env.GIT_COMMIT || 'unknown',
|
|
build: new Date().toISOString(),
|
|
};
|
|
|
|
router.get('/', (_req, res) => {
|
|
res.json(VERSION);
|
|
});
|
|
|
|
export default router;
|