IS_DOCKER = false; function basePathConstruction (IP) { IP_DOMAIN = IP; if(env.buildFor) { if(document.URL.indexOf("www") > -1) SERVER_IP = env.secure + "www." + IP_DOMAIN; else SERVER_IP = env.secure + IP_DOMAIN; } else { SERVER_IP = IP_DOMAIN; } SERVICES_BASEURL = "/rest/"; SERVICES_VERSION = "v1/"; SERVICES_CONSTRUCTED_URL = SERVER_IP + SERVICES_BASEURL + SERVICES_VERSION; if(IP_DOMAIN.indexOf('devkalgudi') > -1) { /*BUCKETNAME = "http://kalgudibucket"; ATTACH_BUCKETNAME = "http://devkalgudidata";*/ IS_DOCKER = true; BUCKETNAME = window.location.origin + '/s3/kalgudibucket/'; ATTACH_BUCKETNAME = window.location.origin + '/s3/devkalgudidata/'; } else if(IP_DOMAIN.indexOf('rckalgudi') > -1) { BUCKETNAME = "https://kalgudibeta"; ATTACH_BUCKETNAME = "https://rckalgudidata"; } else if (window.location.origin.includes('192.168')) { IS_DOCKER = true; BUCKETNAME = window.location.origin + ':8001/kalgudibucket/'; ATTACH_BUCKETNAME = window.location.origin + ':8001/devkalgudidata/'; } else { BUCKETNAME = "https://kalgudibeta"; ATTACH_BUCKETNAME = "https://kalgudidata"; } SERVICE_FACTORY_URLS = { "PROFILE" : SERVICES_CONSTRUCTED_URL + "profiles/", "CONNECTS" : SERVICES_CONSTRUCTED_URL + "connects/", "COMMONDATA" : SERVICES_CONSTRUCTED_URL + "commondata/", "TRADERAPP" : SERVICES_CONSTRUCTED_URL + "traderapp/", "CONTENT" : SERVICES_CONSTRUCTED_URL + "content/", "CCP" : SERVICES_CONSTRUCTED_URL + "ccp/", "SEARCH" : SERVICES_CONSTRUCTED_URL, "S3" : SERVER_IP + SERVICES_BASEURL, "S3UPLOAD" : SERVER_IP + "/upload", "S3PICUPLOAD" : SERVER_IP + "/profilepicupload", /*"S3PICUPLOAD" : SERVICES_CONSTRUCTED_URL + "commondata/uploadProfilePic",*/ "RULESLOOKUP" : SERVER_IP, "ADS" : SERVICES_CONSTRUCTED_URL, "ACCOUNTS" : SERVER_IP + "/myaccounts", "WEBSOCKET_NOTIFICATIONS" : "ws://" + IP_DOMAIN + "/notifier", "BIZCONTACTS" : SERVICES_CONSTRUCTED_URL + "thirdparty/", "ACCOUNTSSESSION" : SERVICES_CONSTRUCTED_URL + "accounts/", "TEASER" : SERVICES_CONSTRUCTED_URL + "teaser/", "REPORTABUSE" : SERVICES_CONSTRUCTED_URL, "S3BUCKET" : BUCKETNAME + (IS_DOCKER ? '' : ".s3.amazonaws.com/"), "CROPCALENDAR": SERVICES_CONSTRUCTED_URL + "/entities/cropcalendars/" // Crop calendar base URL }; CONSTANT_IDS = { "agriculturalProduceTraderId" : "BT000000", "agriculturalProduceFarmerId" : "BT000002" } } /** * Environment URL's constants. Use these contants to write logics * based on environment. */ const ENV_DEV = window.location.origin.includes('192.168') ? window.location.hostname : "devkalgudi.vasudhaika.net"; const ENV_PROD = "kalgudi.com"; const ENV_RC = "rckalgudi.com"; var env = { "buildFor" : true, // 'false' for mobile apk otherwise 'true' for desktop "isProduction" : true, // 'false' for dev and rc environment, 'true' for kalgudi.com. "isRC" : false, // 'false' for dev and production environment, 'true' for rckalgudi.com. "enviorment" : ENV_PROD, // Change the enviorment based on your requirement. "secure" : "https://", // 'https' for production otherwise 'http' for devkalgudi, "appVersion" : "1.1.429", // 1.1.429 for production apk, D1.1.310 for dev apk "plateForm" : "DESKTOP", // Change according plateform ex. 'DESKTOP' for webapp and 'APK' for mobile apk. "apkVersion" : "3.1.1012" // This is the current APK version. update it before APK release } /* To change configurations according to browsing domain */ if(env.buildFor) { env.enviorment = window.location.origin.includes(ENV_DEV) ? ENV_DEV : (window.location.origin.includes(ENV_RC) ? ENV_RC : ENV_PROD); env.secure = env.enviorment == ENV_DEV ? "http://" : "https://"; env.isProduction = (env.enviorment == ENV_PROD); env.isRC = (env.enviorment == ENV_RC); } var IP_DOMAIN; var SERVER_IP; var SERVICES_BASEURL; var SERVICES_VERSION; var SERVICES_CONSTRUCTED_URL; var SERVICE_FACTORY_URLS; var APP_VERSION = env.appVersion; var ENVIRONMENT = "development"; var CONSTANT_IDS; var BUCKETNAME; var APK_VERSION = env.apkVersion; var S3AMAZON = "https://s3.amazonaws.com/kalgudicontent/exim"; var S3AWSURL = 'https://s3.amazonaws.com/' // For production or dev var DIRURL = env.secure + 'dir.kalgudi.com'; if (window.location.origin.includes('192.168')) { var S3AWSURL = "http://192.168.1.65:8001/"; var S3AMAZON = "http://192.168.1.65:8001/kalgudicontent/exim"; } /* Modify below properties before production deployment */ var BUILD_BASE_PATH = env.isProduction ? "build/scripts/" : ""; // Use 'build/scripts/' for production deployment, keep '' for development var BUILD_EXTENSION = env.isProduction ? ".min.js" : ".js"; // Use '.min.js' for production deployment, use '.js' for development var BUILD_VERSION = "?v=MTb3PdC"; // Copy deployment version from fingerPrint.json (ie. web.min.js?v=M30upW3) file for production deployment, leave it blank otherwise;