npm-packages/README.md
npm-packages contains the cli, demos, tutorials, tests, scripts and more. We use
Rush for package management, so don't run npm install in these directories.
See the main convex/README.md file for details.
To add a new package that uses convex, follow these steps instead of our quickstart:
"name" in your new package.json file to match your subdirectory
namejust rush update to install dependenciesYou can run projects against either a local backend, or against prod.
If your project requires changes that have not yet been deployed, you'll need to test against a local backend.
To use a local backend:
just run-local-backendjust convex devTo use a local big-brain (runs both backend and big brain locally):
just run-big-brainTest with: line output by big-brain:2023-07-12T19:07:07.422400Z INFO big_brain::model: Test with: CONVEX_PROVISION_HOST=http://0.0.0.0:8050 npx convex dev --override-auth-url "https://cheerful-lake-55-staging.authkit.app/" " --override-auth-client "XXXXXXXXX"
To run against prod:
Just run npx convex dev
The OpenAPI spec for the Platform APIs in @convex-dev/platform is
automatically generated from the Rust code.
Run cargo test -p big_brain test_api_specs_match to rebuild the management API
specs, cargo test -p local_backend test_api_specs_match to rebuild the
deployment API specs, and npm run generateApiSpec to rebuild the clients.
This updates:
management-openapi.json - Platform management APIdashboard-management-openapi.json - Dashboard management APIRun cargo test -p local_backend test_api_specs_match to rebuild the deployment
API specs.
This updates:
deployment-openapi.json - Public deployment API (queries, mutations,
actions)dashboard-deployment-openapi.json - Dashboard deployment API (admin
operations)