fix: Update port and improve logging
- Change server port from 8086 to 8080 - Use `console.print_info` for logging instead of `println` - Improve error handling in `decode_generic` - Update JSONRPC imports for consistency - Add `console.print_stderr` for not found methods - Refactor `DBCalendar.list` to remove redundant `println` - Add `console.print_info` for logging fallback - Introduce `print_info` in console module for blue text output
This commit is contained in:
@@ -10,7 +10,7 @@ fn main() {
|
||||
heromodels.new(reset: true, name: 'test')!
|
||||
heromodels.server_start(
|
||||
name: 'test'
|
||||
port: 8086
|
||||
port: 8080
|
||||
auth_enabled: false // Disable auth for testing
|
||||
cors_enabled: true
|
||||
reset: true
|
||||
|
||||
@@ -5,7 +5,7 @@ import freeflowuniverse.herolib.schemas.openrpc
|
||||
import os
|
||||
|
||||
// 1. Create a new server instance
|
||||
mut server := heroserver.new(port: 8086)!
|
||||
mut server := heroserver.new(port: 8080)!
|
||||
|
||||
// 2. Create and register your OpenRPC handlers
|
||||
// These handlers must conform to the `openrpc.OpenRPCHandler` interface.
|
||||
@@ -14,8 +14,8 @@ openrpc_path := os.join_path(script_dir, 'openrpc.json')
|
||||
handler := openrpc.new_handler(openrpc_path)!
|
||||
server.register_handler('comments', handler)!
|
||||
|
||||
println('Server starting on http://localhost:8086')
|
||||
println('Documentation available at: http://localhost:8086/doc/comments/')
|
||||
println('Comments API available at: http://localhost:8086/api/comments')
|
||||
println('Server starting on http://localhost:8080')
|
||||
println('Documentation available at: http://localhost:8080/doc/comments/')
|
||||
println('Comments API available at: http://localhost:8080/api/comments')
|
||||
|
||||
server.start()!
|
||||
|
||||
Reference in New Issue
Block a user