Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drewxs/axum-api
Axum Postgres Starter
https://github.com/drewxs/axum-api
axum postgresql
Last synced: 5 days ago
JSON representation
Axum Postgres Starter
- Host: GitHub
- URL: https://github.com/drewxs/axum-api
- Owner: drewxs
- License: gpl-3.0
- Created: 2023-07-23T21:40:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-10T03:48:46.000Z (10 months ago)
- Last Synced: 2024-04-10T05:02:07.312Z (10 months ago)
- Topics: axum, postgresql
- Language: Rust
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Axum-Postgres Starter
Starter project for an API server using Axum and Postgres.
## Development
### Prerequisites
- [Rust](https://www.rust-lang.org/tools/install)
- [Docker](https://docs.docker.com/get-docker)```sh
# Start Docker
docker compose up -d# Install sqlx and cargo watch CLIs
cargo install sqlx-cli cargo-watch# Add migration
sqlx migrate add -r# Run migrations
sqlx migrate run# Start the server
cargo run# Start the server with watch
cargo watch -qcw src -x run# Enter db shell
docker exec -it postgres bash# Enter db psql shell
docker exec -it postgres psql -U postgres -d dev_db
```