Skip to content

Commit 9cd1e24

Browse files
authored
feat: Unifying EngineServerURL (#59)
* feat: Unifying EngineServerURL * feat: update code
1 parent f423735 commit 9cd1e24

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ yarn run bootstrap
1212
```
1313

1414
### 2. 启动客户端
15+
1516
#### 2.1 开发环境
1617

1718
##### 2.1.1. web 端
@@ -33,9 +34,11 @@ yarn run server-dev
3334

3435
浏览器访问 http://localhost:8888
3536

37+
##### 注意 ⚠️ 2.1.3 本地调试
3638

37-
#### 2.2 生产环境
39+
上一步 `yarn run server-dev` 启动的只是本地一个代理服务器,用于连接的 `TuGraph-db`服务,那么 `TuGraph-db`本身的服务地址在 `server/app/service/tugraph/constant.ts` 中,默认的`HOST_URL` 值是 docker 启动地址 `127.0.0.1:9090`,如果是云环境,请修改这里,例如 `http://x.x.x.x:9090`
3840

41+
#### 2.2 生产环境
3942

4043
```bash
4144

@@ -52,8 +55,8 @@ yarn start
5255

5356
浏览器访问 http://localhost:7001
5457

55-
5658
发布时打压缩包
59+
5760
```
5861
tar -czvf tugraph-db-browser.tgz ./
5962
```

client/src/components/studio/constant/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import wandering_earth_data from './demo-json/wandering_earth.json';
66
export type PROJECT_TAB = 'MY_PROJECT' | 'ALL_PROJEXCT';
77
export const PUBLIC_PERFIX_CLASS = 'ant-tugraph';
88
export { PROXY_HOST } from '@/constants';
9-
export const SERVER_HOST = `http://${window.location.hostname}:9090/LGraphHttpService/Query`;
9+
10+
export { EngineServerURL as SERVER_HOST } from '../../../../../server/app/service/tugraph/constant';
11+
1012
export const STEP_LIST: CollasibleStep[] = [
1113
{
1214
title: '新建一张图',
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export const EngineServerURL = '127.0.0.1:9090/LGraphHttpService/Query';
1+
const HOST_URL = `http://127.0.0.1:9090`;
2+
3+
export const EngineServerURL = `${HOST_URL}/LGraphHttpService/Query`;

0 commit comments

Comments
 (0)