- Change file mode from 644 to 755 for all project files - Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet" - Rename Miner.extra_meta_data to extra_metadata for consistency
28 lines
621 B
Python
Executable File
28 lines
621 B
Python
Executable File
from __future__ import annotations
|
|
|
|
from fastapi import FastAPI
|
|
|
|
from .api_jsonrpc import router as jsonrpc_router
|
|
from .api_rest import router as receipts_router
|
|
from .settings import settings
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
app = FastAPI(title=settings.app_name, debug=settings.debug)
|
|
app.include_router(receipts_router)
|
|
app.include_router(jsonrpc_router)
|
|
|
|
# Add health check endpoint
|
|
@app.get("/health")
|
|
async def health_check():
|
|
return {
|
|
"status": "ok",
|
|
"env": "dev",
|
|
"python_version": "3.13.5"
|
|
}
|
|
|
|
return app
|
|
|
|
|
|
app = create_app()
|