This repository provides an example of:
- Axum REST API
- Axum GraphQL API
- Axum CORS config
- Error handling
- JWT authentication
- Interaction with the database
- Password encryption
- Payload validation
- Rust
- Docker and docker-compose or Postgresql server
- Diesel CLI (for database migrations)
- cp .env.example .env
- docker-compose up -d
- diesel migration run
- cargo run --release
- POST
/register
- required fields:name, email, password
, returns bearer token - POST
/login
- required fields:email, password
, returns bearer token - GET
/authorize
- returns user - GET
/graphql
- graphql playground - POST
/graphql
- graphql endpoint