https://github.com/ilkka/rust-backend-starter
A backend API starter with Rust & postgres
https://github.com/ilkka/rust-backend-starter
api openapi postgres rest rust swagger
Last synced: 12 days ago
JSON representation
A backend API starter with Rust & postgres
- Host: GitHub
- URL: https://github.com/ilkka/rust-backend-starter
- Owner: ilkka
- License: mit
- Created: 2022-01-23T11:16:55.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-15T01:29:40.000Z (20 days ago)
- Last Synced: 2026-01-15T07:56:26.889Z (19 days ago)
- Topics: api, openapi, postgres, rest, rust, swagger
- Language: Rust
- Homepage:
- Size: 68.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Rust backend starter
Rust backend starter with
- OpenAPI spec & swagger with rocket_okapi
- Postgres with diesel
- dotenv for config (for development)
Why? Because I happened to work through this and all the bits weren't immediately obvious.
## How to start developing
1. Install diesel CLI with
```shell
cargo install diesel_cli --no-default-features --features postgres
```
2. Run the dev database with
```shell
docker-compose up -d
```
3. Run migrations with
```shell
diesel migration run
```
4. Install watchexec with
```shell
cargo install watchexec-cli
```
5. Start in dev mode with
```shell
watchexec --restart cargo run
```
6. Open up Swagger UI at http://localhost:8000/swagger