Ocean is a lightweight and intuitive web framework.
Add dependency to Cargo.toml
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.