1
0
mirror of https://github.com/actix/actix-website synced 2025-06-29 08:14:58 +02:00

remove unusable create_app example

This commit is contained in:
Rob Ede
2020-02-16 21:55:16 +00:00
parent 8c711dcaf0
commit 85228f23ea
3 changed files with 2 additions and 28 deletions

View File

@ -108,13 +108,7 @@ The result of the above example would be:
/app -> "app"
/api/test -> "test"
```
Each `ServiceConfig` can have it's own `data`, `routes`, and `services`
It is also possible to create application object in separate function.
`App` type uses complex generics and result type have to use `impl Trait` feature.
This could be useful for unit tests.
{{< include-example example="application" file="config_app.rs" section="config" >}}
Each [`ServiceConfig`][serviceconfig] can have it's own `data`, `routes`, and `services`.
[usingappprefix]: /docs/url-dispatch/index.html#using-an-application-prefix-to-compose-applications
[stateexample]: https://github.com/actix/examples/blob/master/state/src/main.rs
@ -129,3 +123,4 @@ This could be useful for unit tests.
[webscopeconfig]: https://docs.rs/actix-web/2/actix_web/struct.Scope.html#method.configure
[webscope]: https://docs.rs/actix-web/2/actix_web/web/fn.scope.html
[urlfor]: https://docs.rs/actix-web/2/actix_web/struct.HttpRequest.html#method.url_for
[serviceconfig]: https://docs.rs/actix-web/2/actix_web/web/struct.ServiceConfig.html