rsnext/examples/convex
Thomas Ballinger ed4eeb97f1
Update Convex example for v0.2.0 (#41143)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-03 23:47:21 +00:00
..
convex Update Convex example for v0.2.0 (#41143) 2022-10-03 23:47:21 +00:00
pages Update Convex example to convex 0.1.9 (#40162) 2022-09-01 19:51:09 +00: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
package.json Tweak Convex example (#39739) 2022-08-19 18:13:33 +01:00
README.md Update Convex example to convex 0.1.9 (#40162) 2022-09-01 19:51:09 +00: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 convex convex-app
# or
yarn create next-app --example convex convex-app
# or
pnpm create next-app --example convex convex-app

Log in to Convex,

npx convex login

initialize a new Convex project,

npx convex init

and then run the following two commands in two different terminals:

npx convex dev
npm run dev

Once everything is working, commit your code and deploy it to the cloud with Vercel (Documentation).

Use npx convex deploy && npm run build as the build command and set the CONVEX_DEPLOY_KEY environmental variable in Vercel (Documentation).