Crates.io | ocean |
lib.rs | ocean |
version | 0.1.1 |
source | src |
created_at | 2017-02-17 04:57:54.100891 |
updated_at | 2017-02-21 13:43:56.024633 |
description | Ocean is a lightweight and intuitive web framework. |
homepage | https://github.com/fengcen/ocean |
repository | https://github.com/fengcen/ocean.git |
max_upload_size | |
id | 8553 |
size | 38,198 |
Ocean is a lightweight and intuitive web framework.
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!"));
}
Ocean is primarily distributed under the terms of the MIT license. See LICENSE for details.