|
|
@@ -1,11 +1,21 @@
|
|
|
+// 全局配置
|
|
|
+const faasEnvironment = 'development';
|
|
|
+const graphqlEnvironment = 'production';
|
|
|
+
|
|
|
// 基础配置
|
|
|
+const localIP = 'http://localhost';
|
|
|
const serverIP = 'http://123.206.193.98';
|
|
|
+
|
|
|
+const faasIp = faasEnvironment === 'development' ? localIP : serverIP;
|
|
|
+const graphqlIP = graphqlEnvironment === 'development' ? localIP : serverIP;
|
|
|
+
|
|
|
const backendPort = '8999';
|
|
|
const graphqlPort = '3000';
|
|
|
-const backend = serverIP + ':' + backendPort;
|
|
|
+
|
|
|
+const backend = faasIp + ':' + backendPort;
|
|
|
|
|
|
// graphql 配置
|
|
|
-const graphqlUrl = serverIP + ':' + graphqlPort + '/graphql';
|
|
|
+const graphqlUrl = graphqlIP + ':' + graphqlPort + '/graphql';
|
|
|
|
|
|
// api 配置
|
|
|
const getIdUrl = backend + '/getuserid';
|