Skip to content

drewxs/axum-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axum-Postgres Starter

Starter project for an API server using Axum and Postgres.

Development

Prerequisites

# Start Docker
docker compose up -d

# Install sqlx and cargo watch CLIs
cargo install sqlx-cli cargo-watch

# Add migration
sqlx migrate add -r <name>

# 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

Releases

No releases published

Packages

No packages published

Languages