mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-10 19:03:24 +00:00
Move / endpoint to /topics and add version endpoint
- Move GET / to GET /topics for listing topics - Add new GET / endpoint that returns server version (git commit hash) - Update build.js to inject git commit hash as RONDEVU_VERSION - Update API documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
12
build.js
12
build.js
@@ -1,5 +1,14 @@
|
||||
// Build script using esbuild
|
||||
const esbuild = require('esbuild');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
// Get git commit hash
|
||||
let version = 'unknown';
|
||||
try {
|
||||
version = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim();
|
||||
} catch (err) {
|
||||
console.warn('Could not get git commit hash, using "unknown"');
|
||||
}
|
||||
|
||||
esbuild.build({
|
||||
entryPoints: ['src/index.ts'],
|
||||
@@ -14,4 +23,7 @@ esbuild.build({
|
||||
'hono'
|
||||
],
|
||||
sourcemap: true,
|
||||
define: {
|
||||
'process.env.RONDEVU_VERSION': JSON.stringify(version)
|
||||
}
|
||||
}).catch(() => process.exit(1));
|
||||
|
||||
Reference in New Issue
Block a user