Skip to content

Commit

Permalink
refine rest-server.property documentation (apache#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thespica authored Aug 2, 2024
1 parent 72b37f7 commit 6f24080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions content/cn/docs/config/config-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ rest-server.properties 文件的默认内容如下:

```properties
# bind url
# could use '0.0.0.0' or specified (real)IP to expose external network access
restserver.url=http://127.0.0.1:8080
# gremlin server url, need to be consistent with host and port in gremlin-server.yaml
#gremlinserver.url=http://127.0.0.1:8182
Expand All @@ -170,7 +171,7 @@ server.id=server-1
server.role=master
```

- restserver.url:RestServer 提供服务的 url,根据实际环境修改;
- restserver.url:RestServer 提供服务的 url,根据实际环境修改。如果其他 IP 地址无法访问,可以尝试修改为特定的地址;或修改为 `http://0.0.0.0` 来监听来自任何 IP 地址的请求,这种方案较为便捷,但需要留意服务可被访问的网络范围
- graphs:RestServer 启动时也需要打开图,该项为 map 结构,key 是图的名字,value 是该图的配置文件路径;

> 注意:gremlin-server.yaml 和 rest-server.properties 都包含 graphs 配置项,而 `init-store` 命令是根据 gremlin-server.yaml 的 graphs 下的图进行初始化的。
Expand Down Expand Up @@ -375,4 +376,4 @@ curl http://127.0.0.1:8080/graphs/hugegraph_mysql_backend
curl http://127.0.0.1:8080/graphs/hugegraph_rocksdb_backend

{"name":"hugegraph_rocksdb","backend":"rocksdb"}
```
```
5 changes: 3 additions & 2 deletions content/en/docs/config/config-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The default content of the `rest-server.properties` file is as follows:

```properties
# bind url
# could use '0.0.0.0' or specified (real)IP to expose external network access
restserver.url=http://127.0.0.1:8080
# gremlin server url, need to be consistent with host and port in gremlin-server.yaml
#gremlinserver.url=http://127.0.0.1:8182
Expand All @@ -168,7 +169,7 @@ server.id=server-1
server.role=master
```

- `restserver.url`: The URL at which the RestServer provides its services. Modify it according to the actual environment.
- `restserver.url`: The URL at which the RestServer provides its services. Modify it according to the actual environment. If you can't connet to server from other IP address, try to modify it as specific IP; or modify it as `http://0.0.0.0` to listen all network interfaces as a convenient solution, but need to take care of the network area that might access.
- `graphs`: The RestServer also needs to open graphs when it starts. This option is a map structure where the key is the name of the graph and the value is the configuration file path for that graph.

> Note: Both `gremlin-server.yaml` and `rest-server.properties` contain the `graphs` configuration option, and the `init-store` command initializes based on the graphs specified in the `graphs` section of `gremlin-server.yaml`.
Expand Down Expand Up @@ -373,4 +374,4 @@ curl http://127.0.0.1:8080/graphs/hugegraph_mysql_backend
curl http://127.0.0.1:8080/graphs/hugegraph_rocksdb_backend

{"name":"hugegraph_rocksdb","backend":"rocksdb"}
```
```

0 comments on commit 6f24080

Please sign in to comment.