Skip to content

Commit 2bd1025

Browse files
authored
Add base url example
1 parent da4191f commit 2bd1025

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,28 @@ client.general.partition({
6565
console.log(e.statusCode);
6666
console.log(e.body);
6767
});
68+
```
69+
70+
## Change the base URL
71+
72+
If you are self hosting the API, or developing locally, you can change the server URL when setting up the client.
73+
74+
```typescript
75+
const client = new UnstructuredClient({
76+
serverURL: "http://localhost:8000",
77+
security: {
78+
apiKeyAuth: key,
79+
},
80+
});
6881

82+
// OR
83+
84+
const client = new UnstructuredClient({
85+
serverURL: "https://my-server-url",
86+
security: {
87+
apiKeyAuth: key,
88+
},
89+
});
6990
```
7091

7192
<!-- Start Dev Containers -->

0 commit comments

Comments
 (0)