You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
951 B
Plaintext

build: build-ui build-api
migrate:
# Apply schema migrations to the remote D1 database.
# The ALTER TABLE at the end will error if hidden already exists — that's expected.
wrangler d1 execute quotesdb --remote --file migrations/schema.sql
build-api:
# worker-build runs wasm-bindgen to produce ES-module-compatible output in build/worker/.
# Install once with: cargo install worker-build
# --features workers-api enables D1 bindings and route handlers for the Workers runtime.
worker-build --release -- --features workers-api
build-ui:
trunk build --release
deploy: deploy-ui deploy-api
deploy-ui:
# --commit-dirty=true silences the git-dirty warning (expected during local deploys).
wrangler pages deploy dist --project-name quotesdb-ui --branch quotesdb --commit-dirty=true
deploy-api:
wrangler deploy --config wrangler.toml
run-api:
cargo run --features workers-api
run-ui:
trunk serve