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: 5 months 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-29T12:16:22.000Z (11 months ago)
- Last Synced: 2025-01-04T00:47:57.153Z (6 months 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
```