flyer 2.5.0

HTTP framework for rust
Documentation
use std::time::Duration;

use flyer::{server, view::ViewData};

/*

TODO: Create file called `style.css` in folder called `assets` and copy the content below in the file.

```css
.body {
    background-color: block;
}

h1 {
    color: white;
}
```

TODO: Create file called `index.html` in folder called `views` and copy the content below in the file.

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <base href="http://127.0.0.1:9999/">
  <title>Assets Test</title>
  <link href="{{ url(path="style.css") }}" rel="stylesheet">
</head>
<body>
  <h1>Hello World</h1>
</body>
</html>
```

*/

fn main() {
    let server = server("127.0.0.1", 9999)
        .assets("assets", 1024, Duration::from_secs((60 * 60) * 2).as_millis())
        .view("views");

    server.router().get("/", async |_req, res| {
        return res.view("index.html", Some(ViewData::new()));
    });

    println!("Running Server: {}", server.address());

    server.listen();
}