mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-10 10:53:24 +00:00
Fix Cloudflare Worker compatibility for version endpoint
- Add version parameter to AppConfig interface - Pass version from environment config instead of using process.env - Update worker.ts to pass VERSION environment variable - Update wrangler.toml with VERSION variable - Update deploy script to automatically set VERSION to git commit hash This fixes the 'process is not defined' error in Cloudflare Workers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import type { Context } from 'hono';
|
||||
export interface AppConfig {
|
||||
sessionTimeout: number;
|
||||
corsOrigins: string[];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,7 +55,7 @@ export function createApp(storage: Storage, config: AppConfig) {
|
||||
*/
|
||||
app.get('/', (c) => {
|
||||
return c.json({
|
||||
version: process.env.RONDEVU_VERSION || 'unknown'
|
||||
version: config.version || 'unknown'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user