Skip to content

Commit 4961eaa

Browse files
chore: Namananand/ins 2172 update typescript sdk docs (#20)
Because - update typescript sdk docs This commit - update typescript sdk docs
1 parent 1b62d32 commit 4961eaa

File tree

8 files changed

+44
-21
lines changed

8 files changed

+44
-21
lines changed

examples/next-app/README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22

33
### installation
44

5+
make sure you are on `/typescript-sdk/examples/next-app` folder
6+
57
```
6-
npm i @instill-ai/typescript-sdk
8+
pnpm install
79
```
10+
or
11+
812
```
9-
yarn add @instill-ai/typescript-sdk
13+
npm install
1014
```
15+
16+
or
17+
1118
```
12-
pnpm add @instill-ai/typescript-sdk
19+
yarn install
1320
```
1421

22+
1523
### config
1624

1725
- make sure you have vdp up running, to run vdp check this [vdp](https://github.com/instill-ai/vdp)
@@ -35,12 +43,16 @@ CONNECTOR_BACKEND_BASE_URL=http://localhost:8082
3543
MODEL_BACKEND_BASE_URL=http://localhost:8083
3644
```
3745

38-
39-
4046
- see the changes done in `_document.tsx` and `next.env.mjs`
4147

4248
### Now You are ready.
4349

50+
```
51+
pnpm run dev
52+
```
53+
54+
check http://localhost:3000/
55+
4456
```
4557
import { Pipeline, listPipelinesQuery } from "@instill-ai/typescript-sdk";
4658

examples/next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@instill-ai/typescript-sdk": "^0.0.3-rc.0",
12+
"@instill-ai/typescript-sdk": "^0.0.7",
1313
"@types/node": "20.6.2",
1414
"@types/react": "18.2.22",
1515
"@types/react-dom": "18.2.7",

examples/next-app/pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/next-app/src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export default function TypescriptSdkDemo() {
2121
});
2222
}, []);
2323

24-
return <div>{JSON.stringify(pipelines)}</div>;
24+
return <div>{JSON.stringify(pipelines, null, 4)}</div>;
2525
}

examples/node-app/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
## Config and installation
22

3-
### installation
3+
make sure you are on `/typescript-sdk/examples/node-app` folder
44

55
```
6-
npm i @instill-ai/typescript-sdk
6+
pnpm install
77
```
8+
or
9+
810
```
9-
yarn add @instill-ai/typescript-sdk
11+
npm install
1012
```
13+
14+
or
15+
1116
```
12-
pnpm add @instill-ai/typescript-sdk
17+
yarn install
1318
```
1419

1520
### config
@@ -37,6 +42,12 @@ MODEL_BACKEND_BASE_URL=http://localhost:8083
3742

3843
### Now You are ready.
3944

45+
```
46+
pnpm run dev
47+
```
48+
49+
check http://localhost:5000/list-pipelines
50+
4051
```
4152
// setup express project
4253

examples/node-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"dependencies": {
7-
"@instill-ai/typescript-sdk": "^0.0.3-rc.0",
7+
"@instill-ai/typescript-sdk": "^0.0.7",
88
"dotenv": "^16.3.1",
99
"express": "^4.18.2"
1010
},

examples/node-app/pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/node-app/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const instillAI = require("@instill-ai/typescript-sdk");
33
require("dotenv").config(); // Load environment variables from .env file
44

55
const app = express();
6-
const port = process.env.PORT || 3000;
6+
const port = process.env.PORT || 5000;
77

88
// Define a route for listing pipelines using the SDK
99
app.get("/list-pipelines", async (req, res) => {

0 commit comments

Comments
 (0)