28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
###### David Westgate
|
|
# Rust Question and Answer Web app
|
|
|
|
## Background
|
|
This is a simple [Rust](https://www.rust-lang.org/) Web [Axum](https://docs.rs/axum/latest/axum/) server, so far serving a handful of [REST](https://en.wikipedia.org/wiki/REST) [API](https://en.wikipedia.org/wiki/API) endpoints as the basis of a "Q&A" or question and answer application. The APIs supported offer basic [CRUD](https://www.codecademy.com/article/what-is-crud) functionality. Specifically, this example mirrors that which is found in the early chapters of the [Rust Web Development textbook by Bastian Gruber](https://rustwebdevelopment.com/) (except using Axum and not Warp). A frontend web server using [Yew](https://crates.io/crates/yew) is also provided to utilize the APIs
|
|
|
|
### Setup
|
|
|
|
#### Rustup
|
|
First install Rust. I suggest using the [rustup toolchain](https://rustup.rs/)
|
|
|
|
Then run
|
|
```bash
|
|
cargo install trunk
|
|
rustup target install wasm32-unknown-unknown
|
|
```
|
|
|
|
Finally, run both the backend and frontend to use the application
|
|
|
|
### Using the backend crate
|
|
|
|
See [backend/README.md](./backend/README.md)
|
|
|
|
### Using the frontend crate
|
|
|
|
See [frontend/README.md](./frontend/README.md)
|
|
|