Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 939 Bytes

readme.md

File metadata and controls

46 lines (31 loc) · 939 Bytes

Devhub Cache API

This repository leverages PostgreSQL as a caching layer to reduce DevHub's RPC calls to a rate of 1 per second. The API is built using Rust's Rocket framework and deployed on Fly.io.

Develop

cargo watch -q -c -w src/ -x 'run '

SQLx Postgres


More information

Create and run migrations

sqlx migrate add <name>

Creates a new file in migrations/<timestamp>-<name>.sql. Add your database schema changes to this new file.


sqlx migrate run

Compares the migration history of the running database against the migrations/ folder and runs any scripts that are still pending.


Rust + Rocket + Fly.io

git clone --single-branch --branch rocket [email protected]:superfly/rust-templates.git rocket-app
cd rocket-app
curl -L https://fly.io/install.sh | sh
fly launch --generate-name