Skip to content

Commit

Permalink
docs: update README to include instructions for cloning individual ex… (
Browse files Browse the repository at this point in the history
  • Loading branch information
zoubingwu authored Jan 13, 2025
1 parent 8f70c45 commit 92dcf59
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 59 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ pnpm install

3. Each example has its own environment variables that need to be configured. Check the README in each example directory for specific setup instructions.

4. If you only want to clone a single example, you can use the following command:

```bash
npx degit tidbcloud/examples-projects/examples/with-chat2query-api my-example
```

Then cd into that example directory and run `pnpm install`.

You can also replace **with-chat2query-api** with the name of the example you want to clone, for example:

```bash
npx degit tidbcloud/examples-projects/examples/with-data-api my-example
npx degit tidbcloud/examples-projects/examples/with-nextjs-todo my-example
npx degit tidbcloud/examples-projects/examples/with-vector-search my-example
```

Each project requires a `.env` file to be created in the root of the example directory. You can refer to the README in each example directory for more details.

## Examples

### Next.js Todo App
Expand Down
2 changes: 1 addition & 1 deletion examples/with-chat2query-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@trpc/server": "11.0.0-rc.660",
"clsx": "2.1.1",
"framer-motion": "11.15.0",
"next": "15.1.0",
"next": "15.1.4",
"prism-react-renderer": "2.4.0",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-data-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"chart.js": "^4.4.7",
"next": "15.1.0",
"next": "15.1.4",
"react": "18.3.1",
"react-chartjs-2": "^5.2.0",
"react-dom": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nextjs-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@trpc/server": "11.0.0-rc.660",
"clsx": "2.1.1",
"drizzle-orm": "0.38.2",
"next": "15.1.0",
"next": "15.1.4",
"nuqs": "2.2.3",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vector-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@trpc/server": "11.0.0-rc.660",
"ai": "4.0.18",
"clsx": "2.1.1",
"next": "15.1.0",
"next": "15.1.4",
"ollama-ai-provider": "0.16.0",
"prism-react-renderer": "2.4.0",
"react": "18.3.1",
Expand Down
110 changes: 55 additions & 55 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 92dcf59

Please sign in to comment.