Expand description
Main Application Module
This module contains the core RustyX application struct and its implementation,
providing an ExpressJS-like interface for building web APIs.
§Example
use rustyx::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let app = RustyX::new();
app.get("/", |_req, res| async move {
res.json(json!({ "message": "Hello!" }))
});
app.listen(3000).await
}Structs§
- AppSettings
- Application settings configuration.
- RustyX
- The main application struct, similar to Express’s
app.
Type Aliases§
- Handler
Fn - Handler function type for route callbacks.