Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/.umirc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'umi';
import routes from './src/config/routes';
import { GetEnvironmentVariables } from '../server/app/util';
import env from '../env.json';

process.env.MFSU_AD = 'none';

Expand Down Expand Up @@ -50,6 +51,7 @@ export default defineConfig({
'process.env': {
HOST: GetEnvironmentVariables(process.env),
...process.env,
...env,
},
},
});
3 changes: 3 additions & 0 deletions env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"tugraph_db_host": "http://47.105.42.70:9090"
}
6 changes: 3 additions & 3 deletions server/app/service/tugraph/constant.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { log } from 'console';
import { GetEnvironmentVariables } from '../../util';
log(GetEnvironmentVariables(process.env), 'server');
import env from '../../../../env.json';
const HOST = GetEnvironmentVariables(process.env);

export const HOST_URL = `http://47.105.42.70:9090`;
export const DEV_HOST_URL = 'http://127.0.0.1:9090';
export const EngineServerURL = `${
env?.tugraph_db_host ||
HOST?.tugraph_db_host ||
(process.env?.NODE_ENV === 'production' ? DEV_HOST_URL : HOST_URL)
}/LGraphHttpService/Query`;
log(EngineServerURL, 'eng');