- Notifications
You must be signed in to change notification settings - Fork4
Starter template using Rust with Axum, Async-GraphQL, PostgreSQL, and Redis for building high-performance web APIs.
License
NotificationsYou must be signed in to change notification settings
rust-dd/rust-axum-async-graphql-postgres-redis-starter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A modern Rust backend starter template using:
- Axum for HTTP/WebSocket server
- Async-GraphQL for GraphQL APIs
- PostgreSQL via
tokio-postgres
andbb8
async connection pool - Redis via
bb8-redis
async connection pool - Firebase Auth integration
- WebSocket support
- Jemalloc for improved memory performance
- Rust 1.85+ (2024 edition)
- PostgreSQL server
- Redis server
git clone https://github.com/rust-dd/rust-axum-async-graphql-postgres-redis-starter.gitcd rust-axum-async-graphql-postgres-redis-starter
Create a.env
file in the project root:
POSTGRES_HOST=localhostPOSTGRES_PORT=5432POSTGRES_USER=postgresPOSTGRES_PASSWORD=passwordPOSTGRES_DB=postgresREDIS_HOST=redis://localhost:6379FIREBASE_PROJECT_ID=firebase_projectADMIN_SECRET=admin1234
cargo run
Once running, open:http://localhost:8000/graphql
This project usesjemallocator
as the global allocator for improved memory allocation performance in high-throughput environments and simd-json for fast JSON operations.
#[global_allocator]staticGLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
MIT
About
Starter template using Rust with Axum, Async-GraphQL, PostgreSQL, and Redis for building high-performance web APIs.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.