Commit Graph
10 Commits
Author SHA1 Message Date
Sugih Jamin 4558671a0b Redirect HTTP to HTTPS in tls-rustls example (#1166) 2022-07-23 10:23:40 +02:00
David PedersenandJonas Platte fd70f81c46 More robust asset paths in examples (#1090)
* More robust asset paths in examples

* Update examples/low-level-rustls/src/main.rs

Co-authored-by: Jonas Platte <[email protected]>

* format

Co-authored-by: Jonas Platte <[email protected]>
2022-06-15 22:42:49 +02:00
David Pedersen 1fe4558362 Move examples to separate workspace (#978)
* Move examples to separate workspace

* update commands to run examples

* remove debug
2022-04-29 18:53:41 +02:00
Jonas Platte 79b94b9bd6 Replace set_var usage in examples (#829)
* examples: Fix inconsistent toml formatting

* examples: Replace set_var usage
2022-03-06 12:37:00 +01:00
Eray Karatay 2507463706 update tls-rustls example (#494) 2021-11-10 15:07:09 +01:00
David Pedersen 0ee7379d4f Fix compile time regression by boxing routes internally (#404)
This is a reimplementation of #401 but with the new matchit based router.

Fixes #399
2021-10-24 20:52:42 +02:00
Andrei Zolkin 9df57e6ff2 Migrate all examples to use std::env::var_os (#312) 2021-09-12 17:39:43 +02:00
programatik29 1a5f977896 Simplify tls-rustls example (#254)
## Motivation

Current `tls-rustls` example might be inconvenient for some people.

## Solution

Rename current example to `low-level-rustls` and add a high level example in its place.
2021-08-24 09:56:31 +02:00
David Pedersen ca4d9a2bb9 Replace route with Router::new().route() (#215)
This way there is now only one way to create a router:

```rust
use axum::{Router, handler::get};

let app = Router::new()
    .route("/foo", get(handler))
    .route("/foo", get(handler));
```

`nest` was changed in the same way:

```rust
use axum::Router;

let app = Router::new().nest("/foo", service);
```
2021-08-19 22:37:48 +02:00
David Pedersen 6c9651c14a Move all examples to their own crates (#201)
This makes it much clearer which dependencies each example has.
2021-08-18 00:49:01 +02:00