🔖 Checkpoint: Edit /workspaces/claude-code-flow/test-app/config/config.js

This commit is contained in:
rUv committed 2025-08-16 16:39:27 +00:00
1 parent 71b62a2283
commit 3820116c83
3 files changed
+36

No files matched your search

+1
View File
@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250816-163922", "file": "/workspaces/claude-code-flow/test-app/.env.example", "timestamp": "2025-08-16T16:39:22Z", "type": "pre-edit", "original_branch": "alpha90"}
+1
View File
@@ -0,0 +1 @@
{"tag": "checkpoint-20250816-163924", "file": "/workspaces/claude-code-flow/test-app/.env.example", "timestamp": "2025-08-16T16:39:24Z", "type": "post-edit", "branch": "alpha90", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/1755362360.json | 1 + .claude/checkpoints/task-1755362360.json | 1 + claude-flow-wiki | 0 test-app/.env.example | 7 +++++++ 6 files changed, 13 insertions(+), 4 deletions(-) "}
+34
View File
@@ -0,0 +1,34 @@
// Configuration loader with environment variable support
require('dotenv').config();
const config = {
// Application settings
NODE_ENV: process.env.NODE_ENV || 'development',
VERBOSE_LOGGING: process.env.VERBOSE_LOGGING || 'false',
// Additional configuration can be added here
APP_NAME: process.env.APP_NAME || 'test-app',
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
// Validation to ensure required configs are present
validate() {
const required = ['NODE_ENV'];
const missing = required.filter(key => !this[key]);
if (missing.length > 0) {
throw new Error(`Missing required configuration: ${missing.join(', ')}`);
}
return true;
}
};
// Validate configuration on load
try {
config.validate();
} catch (error) {
console.error('Configuration error:', error.message);
process.exit(1);
}
module.exports = config;