Get up and running with Rohas in minutes. This guide will walk you through creating your first event-driven application.
Install the Rohas CLI using the recommended installation script:
curl -fsSL https://raw.githubusercontent.com/rohas-dev/rohas/main/scripts/build.sh | bash
This will automatically install all dependencies and build Rohas CLI.
Alternatively, install via Cargo:
cargo install rohas-cli
Verify the installation:
rohas version
Initialize a new Rohas project:
from generated.api.health import HealthRequest, HealthResponse
from generated.state import State
from datetime import datetime
async def handle_health(req: HealthRequest, state: State) -> HealthResponse:
return HealthResponse(status="ok", timestamp=datetime.now().isoformat())Rust:
use crate::generated::api::health::{HealthRequest, HealthResponse};
use crate::generated::state::State;
use rohas_runtime::Result;
pub async fn handle_health(
req: HealthRequest,
state: &mut State,
) -> Result<HealthResponse> {
Ok(HealthResponse {
status: "ok".to_string(),
timestamp: chrono::Utc::now().to_rfc3339(),
})
}Or start with the workbench UI for a better development experience:
rohas dev --workbench
Your API will be available at http://localhost:3000/health