ocean

Crates.ioocean
lib.rsocean
version0.1.1
sourcesrc
created_at2017-02-17 04:57:54.100891
updated_at2017-02-21 13:43:56.024633
descriptionOcean is a lightweight and intuitive web framework.
homepagehttps://github.com/fengcen/ocean
repositoryhttps://github.com/fengcen/ocean.git
max_upload_size
id8553
size38,198
fvm-crate-owners (github:filecoin-project:fvm-crate-owners)

documentation

https://docs.rs/ocean

README

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.

Commit count: 0

cargo fmt