feat: enhance server documentation and configuration

- Add HTML homepage and JSON handler info endpoints
- Implement markdown documentation generation for APIs
- Introduce auth_enabled flag for server configuration
- Improve documentation generation with dynamic base URLs
- Refactor server initialization and handler registration
This commit is contained in:
Mahmoud-Emad
2025-09-18 12:10:49 +03:00
parent 5eedae9717
commit e59ff8b63f
19 changed files with 974 additions and 1937 deletions

View File

@@ -5,9 +5,11 @@ import freeflowuniverse.herolib.hero.heromodels
import time
fn main() {
// Start the server in a background thread
// Start the server in a background thread with authentication disabled for testing
spawn fn () {
rpc.start(port: 8080) or { panic('Failed to start HeroModels server: ${err}') }
rpc.start(port: 8080, auth_enabled: false) or {
panic('Failed to start HeroModels server: ${err}')
}
}()
// Keep the main thread alive