rsnext/examples/convex
Alex Cole 11bd44f031
Update Convex Example (#39562)
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>
2022-08-16 01:21:53 +01:00
..
convex Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
pages Update Convex example. (#38850) 2022-07-20 18:55:45 -05:00
public Add Convex example (#38129) 2022-06-30 10:26:46 +00:00
styles Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
.gitignore Update default gitignore templates (#39051) 2022-07-26 20:08:40 -05:00
.prettierignore Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
.prettierrc.json Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
convex.json Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
next-env.d.ts Add Convex example (#38129) 2022-06-30 10:26:46 +00:00
package.json Update Convex Example (#39562) 2022-08-16 01:21:53 +01:00
README.md Update Convex example. (#38850) 2022-07-20 18:55:45 -05:00
tsconfig.json Add Convex example (#38129) 2022-06-30 10:26:46 +00:00

Convex

This example demonstrates the Convex global state management framework.

Deploy your own

Deploy the example using Vercel:

Deploy with 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).