Skip to content

Commit 8cf9d96

Browse files
authored
docs: rename HTTP Server to CocoInsight Access and add clarification (#1354)
1 parent 0e8d106 commit 8cf9d96

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

docs/docs/http_server.mdx renamed to docs/docs/cocoinsight_access.mdx

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
---
2-
title: HTTP Server
3-
description: Run the built-in HTTP server for CocoInsight and health check
2+
title: CocoInsight Access
3+
description: Give CocoInsight access to your CocoIndex flows
44
---
55

6+
## CocoInsight
7+
8+
CocoInsight is a comprehensive web UI to help you understand your flows and interact with the index.
9+
10+
CocoInsight itself has zero data retention with your flows schema and data.
11+
It talks to your CocoIndex server through HTTP APIs to retrieve flow schema and data when you're using it.
12+
13+
CocoIndex library exposes an HTTP server, mainly for CocoInsight to access your CocoIndex flows and their schema and data.
14+
15+
On YouTube there're a couple videos that give you a quick tour of CocoInsight:
16+
17+
* [Introducing CocoInsight](https://www.youtube.com/watch?v=MMrpUfUcZPk)
18+
* [Fast Iterate Your Indexing Strategy with CocoInsight](https://www.youtube.com/watch?v=crV7odEVYTE)
19+
620
## Start the server
721

822
There are two ways to start the server:
@@ -11,8 +25,8 @@ There are two ways to start the server:
1125

1226
Use the `cocoindex server` command. See more options in the [CLI](./core/cli).
1327

14-
- Default bind address: **127.0.0.1:49344** (only exposed locally for safety)
15-
- Override if you need to expose to all IPs (example: `0.0.0.0:49344`)
28+
* Default bind address: **127.0.0.1:49344** (only exposed locally for safety)
29+
* Override if you need to expose to all IPs (example: `0.0.0.0:49344`)
1630

1731
```sh
1832
# Start on the default local address (127.0.0.1:49344)
@@ -29,11 +43,11 @@ cocoindex server path/to/app.py \
2943

3044
Flags of interest:
3145

32-
- `-a`, `--address <IP:PORT>`: Bind address (defaults to 127.0.0.1:49344)
33-
- `-ci`, `--cors-cocoindex`: Allow `https://cocoindex.io` (CocoInsight) to access the server
34-
- `-c`, `--cors-origin <ORIGINS>`: Comma-separated list of allowed origins
35-
- `-cl`, `--cors-local <PORT>`: Allow `http://localhost:<PORT>`
36-
- `-L`, `--live-update`: Enable live updates while the server is running
46+
* `-a`, `--address <IP:PORT>`: Bind address (defaults to 127.0.0.1:49344)
47+
* `-ci`, `--cors-cocoindex`: Allow `https://cocoindex.io` (CocoInsight) to access the server
48+
* `-c`, `--cors-origin <ORIGINS>`: Comma-separated list of allowed origins
49+
* `-cl`, `--cors-local <PORT>`: Allow `http://localhost:<PORT>`
50+
* `-L`, `--live-update`: Enable live updates while the server is running
3751

3852
### Python API
3953

@@ -63,17 +77,17 @@ start_server(server_settings)
6377

6478
## What the server provides today
6579

66-
- **CocoInsight access**: Enable with CLI `-ci`, or by API set `ServerSettings.cors_origins` to `"https://cocoindex.io"`. Then open [https://cocoindex.io/cocoinsight](https://cocoindex.io/cocoinsight) and point it to your server address.
80+
* **CocoInsight access**: Enable with CLI `-ci`, or by API set `ServerSettings.cors_origins` to `"https://cocoindex.io"`. Then open [https://cocoindex.io/cocoinsight](https://cocoindex.io/cocoinsight) and point it to your server address.
6781
It'll talk to CocoIndex internal REST APIs exposed through `/cocoindex/api`.
6882
The internal API is mainly designed for CocoInsight to use today, is subject to change and not considered as stable.
6983

70-
- **Live updates from the CLI**: When running with `-L`, the server performs live updates while it’s up.
84+
* **Live updates from the CLI**: When running with `-L`, the server performs live updates while it’s up.
7185
It's doing same thing as `cocoindex update -L` while the HTTP server is running.
7286

73-
- **Health check**: `GET /healthz` responds with `application/json`:
87+
* **Health check**: `GET /healthz` responds with `application/json`:
7488

75-
- `status`: always `"ok"` when healthy
76-
- `version`: the build-time package version (e.g., `"0.3.5"`)
89+
* `status`: always `"ok"` when healthy
90+
* `version`: the build-time package version (e.g., `"0.3.5"`)
7791

7892
Example response:
7993

docs/docusaurus.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ const config: Config = {
7878
from: '/ops/sources',
7979
to: '/sources',
8080
},
81+
{
82+
from: '/http_server',
83+
to: '/cocoinsight_access',
84+
},
8185
],
8286
},
8387
],

docs/sidebars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const sidebars: SidebarsConfig = {
7676
},
7777
{
7878
type: 'doc',
79-
id: 'http_server',
80-
label: 'HTTP Server',
79+
id: 'cocoinsight_access',
80+
label: 'CocoInsight Access',
8181
},
8282
{
8383
type: 'doc',

0 commit comments

Comments
 (0)