A personal GraphQL API, implemented in Rust.
This branch is a WIP! For previous implementations in Go, see the
v2
branch.
-
Ensure you have the required development dependencies:
-
Clone and enter repo:
git clone [email protected]:stevenxie/api cd api
-
Configure
.env
:cp .env.example .env # copy template vi .env # edit template
-
Install dependencies, set up hooks, and build targets:
cargo build
# Start dependencies (database, etc.):
docker-compose up -d
# Run server:
cargo run -- serve
# Format source code:
cargo fmt
# Run tests:
cargo test
# Check and lint source code:
cargo check && cargo clippy