Include instructions on running examples in README
@@ -61,12 +61,18 @@ async-std = { version = "1.5.0", features = ["attributes"] }
#[async_std::main]
async fn main() -> Result<(), std::io::Error> {
let mut app = tide::new();
- app.at("/").get(|_| async move { "Hello, world!" });
+ app.at("/").get(|_| async { Ok("Hello, world!") });
app.listen("127.0.0.1:8080").await?;
Ok(())
}
```
+To try [the included examples](https://github.com/http-rs/tide/tree/master/examples), check out this repository and run
+```sh
+$ cargo run --example # shows a list of available examples
+$ cargo run --example hello
+```
+
## Resources
Read about the design here:
