Backend server for Bookshelf.
Set up auth0 by following:
https://auth0.com/developers/hub/code-samples/api/actix-web-rust/basic-authorization
mv .env.template .env
vim .env # Fill your valuecargo install sqlx-cli
sqlx migrate runcargo runcp .env.template .env.docker
vim .env.docker # Fill your valuedocker-compose up --buildcargo test# 1) Start containers
cp .env.template .env.docker
docker compose -f docker-compose-test.yml up -d
# 2) Database setup (install sqlx if needed)
cargo install sqlx-cli --no-default-features --features postgres,rustls
sqlx database create
sqlx migrate run
docker compose -f docker-compose-test.yml exec -T db psql -U postgres -c "CREATE ROLE bookshelf WITH LOGIN PASSWORD 'password';"
docker compose -f docker-compose-test.yml exec -T db psql -U postgres -c "CREATE DATABASE bookshelf OWNER bookshelf;"
# 3) Start application server (in a separate terminal)
PORT=8080 AUTH0_AUDIENCE=<your-auth0-audience> AUTH0_DOMAIN=<your-auth0-domain> DATABASE_URL=<your-database-url> ALLOWED_ORIGINS=http://localhost:8080 \
cargo run
# 4) Run E2E tests
TEST_SERVER_URL=http://localhost:8080 \
cargo test -p bookshelf-e2e -- --test-threads=1auth0 test token --no-input <client-id> -a <your-auth0-audience>Run server and access /graphql/playground.
cargo run --bin gen_schemaPublish a new release.