Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ddanielsantos/rust-pg-docker-boilerplate
My personal rust boilerplate for rest APIs
https://github.com/ddanielsantos/rust-pg-docker-boilerplate
Last synced: 4 days ago
JSON representation
My personal rust boilerplate for rest APIs
- Host: GitHub
- URL: https://github.com/ddanielsantos/rust-pg-docker-boilerplate
- Owner: ddanielsantos
- Created: 2024-05-01T19:02:00.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T12:16:22.000Z (3 months ago)
- Last Synced: 2024-10-12T04:52:44.720Z (about 1 month ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-pg-docker-boilerplate
Boilerplate for Rest APIs with:
- Rust
- Docker
- Postgres
- Tokio
- Axum
- SQLx
- Dotenvy
- Docker ComposeBefore using, make sure to create a ``migrations`` folder, so SQLx can work correctly:
```bash
mkdir migrations
```You'll also need a ``.env`` file, containing a DATABASE_URL variable, pointing to your postgres database
```bash
echo "DATABASE_URL=postgres://develop:super_strong_pass@localhost:5432/devdb" > .env
```Now you should be able of running the application, like any other rust binary:
```bash
cargo r
```