ocean 0.1.1

Ocean is a lightweight and intuitive web framework.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

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!"));
}