bolt-web 0.1.2

⚡ A high-performance, minimalist web framework for Rust, inspired by Express.js and Gin.
Documentation
1
2
3
4
5
6
7
8
9
use serde_json::json;

use crate::{bolt_error_handler, response::ResponseWriter};

async fn default(msg: String, res: &mut ResponseWriter) {
    res.status(res.status).json(&json!({ "error": msg }));
}

bolt_error_handler!(default);