Skip to content

Run Locally

Use local mode to test checkout payloads before routing traffic to https://api.cordite.dev.

From the project root:

Terminal window
export CORDITE_DB_PATH=./cordite.dev.db
export CORDITE_RULES_DIR=./rules
export CORDITE_BIND=127.0.0.1:3000
cargo run -- admin issue-key --vendor "Sandbox Store" --tier free
cargo run -- serve

In another terminal:

Terminal window
curl -s http://127.0.0.1:3000/health
curl -s -H "Authorization: Bearer ck_test_..." http://127.0.0.1:3000/v1/jurisdictions/90210

Keep CORDITE_RULES_DIR pointed at your local rules tree so jurisdiction and notice behavior matches the provision set you are testing.