11bd44f031
This makes a few changes to the Convex example app. We're using this example app in the Convex quick start (https://docs.convex.dev/quick-start), so I want to make sure we're setting new users up for success. Upgrade to the newest version of Convex (includes adding a tsconfig.json for Convex functions) Switch to pinning Convex to latest Check in generated code so the example will make more sense to users browsing on GitHub or before they regenerate the code. This required ignoring it in the global .prettierignore Add prettier Update styling so "Powered by Convex" appears on screen. Switch the syntax of one function to make it type check after developers add a schema Documentation / Examples Make sure the linting passes by running pnpm lint The examples guidelines are followed from our contributing doc Co-authored-by: JJ Kasper <jj@jjsweb.site> |
||
---|---|---|
.. | ||
convex | ||
pages | ||
public | ||
styles | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
convex.json | ||
next-env.d.ts | ||
package.json | ||
README.md | ||
tsconfig.json |
Convex
This example demonstrates the Convex global state management framework.
Deploy your own
Deploy the example using Vercel:
How to use
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example with-convex with-convex-app
# or
yarn create next-app --example with-convex with-convex-app
# or
pnpm create next-app --example with-convex with-convex-app
Log in to Convex,
npx convex login
initialize a new Convex project,
npx convex init
and push the Convex functions for this project.
npx convex push
Now you can run your code locally with a Convex backend with
npm run dev
Deploy it to the cloud with Vercel (Documentation).