ripress 1.0.1

An attempt to make an http server library like express.js in rust
Documentation

Ripress

An express-inspired Rust-based web framework

Please star the repo if you like it, so that I know someone is using it.

Table of Contents


Overview

Ripress is a web framework inspired by Express.js.

Goals

  • Provide an intuitive and simple API like Express.js
  • Focus on developer experience first; performance optimizations will come later
  • Prioritize ease of use over low-level control initially

Installation

You can add ripress to your project using Cargo:

cargo add ripress
cargo add tokio --features macros,rt-multi-thread

Basic Example

use ripress::{
    app::App,
    context::{HttpRequest, HttpResponse},
    types::RouterFns,
};

#[tokio::main]
async fn main() {
    let mut app = App::new();

    app.get("/", handler);

    app.listen(3000, || {
        println!("Server is running on port 3000");
    })
    .await;
}

async fn handler(_req: HttpRequest, res: HttpResponse) -> HttpResponse {
    res.status(200)
        .json(json!({"message": "Welcome to Ripress!"}))
}

View more basic examples in Examples dir.

View full blown code examples here.

Documentation

Getting Started Guide

Changelog

View Changelog