11 releases

Uses old Rust 2015

0.1.10 Sep 28, 2018
0.1.9 Sep 28, 2018
0.1.8 Apr 14, 2018
0.1.7 Mar 20, 2018
0.1.2 Jan 21, 2018

#22 in #hyper-server

MIT license

24KB
594 lines

Pony

An Express-like wrapper around Hyper

Very little has been done to abstract Hyper away from the end user. The idea being that providing a simple api for declaring rest endpoints makes developing easier.

Example

extern crate pony;
extern crate futures;
extern crate hyper;

use futures::future::ok;
use pony::PonyBuilder;
use hyper::server::Response;
use hyper::header::ContentLength;

fn main() {
    let mut pb = PonyBuilder.new();
    pb.get("/get", )
}

fn hello_world() {
    let hw = "hello world"
    Box::new(
        ok(
            Response::new()
            .with_header(ContentLength(hw.len()))
            .with_body(&hw)
        )
    )
}

Dependencies

~9MB
~153K SLoC