Skip to content

chalmersproject/api

Repository files navigation

chalmersproject/api

The API backend for the Chalmers Project.

Usage

Try the currently deployed API playground at: https://api.chalmersproject.com

Development

You'll need the latest versions of the Rust language toolchain, Docker, and Docker Compose. libpq (on ubuntu sudo apt-get install libpq-dev)

# If you don't have a .env, scaffold one:
cp .env.example .env

# Configure your .env:
vi .env

# Run prerequisite services, like Postgres:
docker-compose up -d

# Apply database migrations:
cargo run -- migrate

# Start server:
cargo run -- serve

# Try the GraphQL playground:
open http://localhost:8080

# ...

# Shut down prerequisite services (cleanup):
docker-compose down