2 releases

Uses old Rust 2015

0.1.1 Feb 21, 2017
0.1.0 Feb 17, 2017

#19 in #intuitive

MIT license

37KB
1K SLoC

Ocean

Build Status status docs

Ocean is a lightweight and intuitive web framework.

Document

Usage

Add dependency to Cargo.toml

[dependencies]
ocean = "^0.1"

In your main.rs:

extern crate ocean;

use ocean::prelude::*;

fn main() {
    let mut app = ocean::app();

    app.router.get("/", index);

    app.listen("0.0.0.0", 3000);
}

fn index(_: Request, res: Response) {
    res.send(String::from("Hello world!"));
}

License

Ocean is primarily distributed under the terms of the MIT license. See LICENSE for details.


lib.rs:

Ocean is a lightweight and intuitive web framework.

Examples

extern crate ocean;

use ocean::prelude::*;

fn main() {
    let mut app = ocean::app();

    app.router.get("/", index);

    app.listen("0.0.0.0", 3000);
}

fn index(_: Request, res: Response) {
    res.send(String::from("Hello world!"));
}

Dependencies

~7MB
~150K SLoC