A collection of crates that provide examples for developing web applications with the Gotham web framework.
All crates include test cases that prove correct behaviour and serve as an example of how to test your applications.
These examples assume a familiarity with the Rust programming language. If you're new to Rust itself the following resources will assist you to get started:
We've grouped examples by functionality. Each group provides one or more examples so you can start with the basics and then ramp up as you become more comfortable.
We recommend reading the examples in the order shown below to allow them to build upon one another. Each group provides it's own README with further information on functionality and ordering.
Functionality | Description | Count^ |
---|---|---|
Hello World | The famous Hello World example application. | 1 |
Hello World with shutdown | Hello World application with graceful shutdown. | 1 |
Routing | Dispatching Requests to functionality provided by your application. |
4 |
Path | Extracting data from the Request path ensuring type safety. |
2 |
Query String | Extracting data from the Request query string whilst ensuring type safety. |
1 |
Cookies | Working with Cookies. | 1 |
Sessions | Working with Sessions. | 2 |
Headers | Working with HTTP Headers. | 1 |
Handlers | Developing application logic that responds to web requests. | 5 |
Middleware | Developing custom middleware for your application. | 1 |
Shared State | Sharing state across your application. | 1 |
Into Response | Implementing the Gotham web framework's IntoResponse trait. |
1 |
Templating | An example using various templating engines. | 1 |
Static Assets | Serving static assets. | 1 |
OpenSSL | Using alternative TLS implementations. | 1 |
^ Gotham web framework examples are under active development.
We welcome example contributions from the community. To get started please see the example contribution template README file and starter crate.
You can get help for the Gotham web framework at:
Licensed under your option of:
The following policies guide participation in our project and our community: