Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Convex example to convex 0.1.9 #40162

Merged
merged 2 commits into from Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions examples/convex/README.md
Expand Up @@ -13,11 +13,11 @@ Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_mediu
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example with-convex with-convex-app
npx create-next-app --example convex convex-app
# or
yarn create next-app --example with-convex with-convex-app
yarn create next-app --example convex convex-app
# or
pnpm create next-app --example with-convex with-convex-app
pnpm create next-app --example convex convex-app
```

Log in to Convex,
Expand All @@ -32,16 +32,16 @@ initialize a new Convex project,
npx convex init
```

and push the Convex functions for this project.
and then run the following two commands in two different terminals:

```bash
npx convex push
npx convex dev
```

Now you can run your code locally with a Convex backend with

```bash
npm run dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
Once everything is working, commit your code and deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).

Use `npx convex deploy && npm run build` as the build command and set the `CONVEX_DEPLOY_KEY` environmental variable in Vercel ([Documentation](https://docs.convex.dev/getting-started/deployment/hosting/vercel)).
2 changes: 1 addition & 1 deletion examples/convex/convex/_generated/dataModel.ts
Expand Up @@ -4,7 +4,7 @@
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@0.1.8.
* Generated by convex@0.1.9.
* To regenerate, run `npx convex codegen`.
* @module
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/convex/convex/_generated/react.ts
Expand Up @@ -4,7 +4,7 @@
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@0.1.8.
* Generated by convex@0.1.9.
* To regenerate, run `npx convex codegen`.
* @module
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/convex/convex/_generated/server.ts
Expand Up @@ -4,7 +4,7 @@
*
* THIS CODE IS AUTOMATICALLY GENERATED.
*
* Generated by convex@0.1.8.
* Generated by convex@0.1.9.
* To regenerate, run `npx convex codegen`.
* @module
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/convex/pages/_app.tsx
Expand Up @@ -2,8 +2,8 @@ import '../styles/globals.css'
import type { AppProps } from 'next/app'

import { ConvexProvider, ConvexReactClient } from 'convex/react'
import convexConfig from '../convex.json'
const convex = new ConvexReactClient(convexConfig.origin)
import clientConfig from '../convex/_generated/clientConfig'
const convex = new ConvexReactClient(clientConfig)

function MyApp({ Component, pageProps }: AppProps) {
return (
Expand Down