config.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // 全局配置
  2. const environment = 'production';
  3. // 全局差异化配置,无需配置请留空
  4. const faasEnvironment = '';
  5. const graphqlEnvironment = '';
  6. // 基础配置
  7. const localIP = 'http://localhost';
  8. const serverIP = 'http://123.206.193.98';
  9. const backendPort = '8999';
  10. const graphqlPort = '3000';
  11. // 无需配置
  12. const faasIp = (faasEnvironment || environment) === 'development' ? localIP : serverIP;
  13. const graphqlIP = (graphqlEnvironment || environment) === 'development' ? localIP : serverIP;
  14. const backend = faasIp + ':' + backendPort;
  15. // graphql 配置
  16. const graphqlUrl = 'http://online.ioobot.cn/graphql';
  17. // api 配置
  18. const getIdUrl = backend + '/getuserid';
  19. const loginUrl = backend + '/login';
  20. const logoutUrl = backend + '/logout';
  21. const registerUrl = backend + '/resetpassword';
  22. // graphql 部署配置
  23. const backendGQ = backend + '/graphql';
  24. const genJsUrl = backendGQ + '/genjs';
  25. const checkSchemaUrl = backendGQ + '/compile';
  26. const deployUrl = backendGQ + '/deployall';
  27. const removeFC = backendGQ + '/removefc';
  28. const removeAPI = backendGQ + '/removeapi';
  29. // 管理员配置
  30. // 通过在该数组中添加 userID,可以管理 trialcase 的增删改查
  31. const manageUsers = ['xy_1_je9{d\'\'_32sD+'];
  32. // fc 配置
  33. const deployAll = 'http://deploy.ioobot.cn/api/deploy-all';
  34. const storeFile = 'http://deploy.ioobot.cn/api/store-file';
  35. export {
  36. getIdUrl,
  37. loginUrl,
  38. registerUrl,
  39. logoutUrl,
  40. checkSchemaUrl,
  41. deployUrl,
  42. genJsUrl,
  43. graphqlUrl,
  44. manageUsers,
  45. removeFC,
  46. removeAPI,
  47. deployAll,
  48. storeFile
  49. }