import _ from 'lodash'

const getBaseUrl = function() {
	const { protocol } = _.get(window, 'location', { protocol: '', location: '', port: '' })
	// const { protocol, host }
	// if (window && host.indexOf('test.ru') !== -1) {
	// 	return `${protocol}//localhost:3000/api/`
	// }
	return `${protocol}//localhost:3000/api/`
}

const axiosDefaults = {
	baseURL: getBaseUrl(),
	timeout: 60000,
	withCredentials: false
}

const core = {
	locale: 'ru',
	localStorage: {
		name: 'cart'
	}
}

export default core
export { core, axiosDefaults }

@@ -66,16 +66,22 @@
 protocol
+, host
  %7D = _.g
@@ -150,40 +150,8 @@
 %7D)%0A%09
-// const %7B protocol, host %7D%0A%09// 
 if (
@@ -178,15 +178,17 @@
 Of('
-test.ru
+herokuapp
 ') !
@@ -197,19 +197,16 @@
  -1) %7B%0A%09
-// 
 %09return 
@@ -223,30 +223,46 @@
 l%7D//
-localhost:3000
+safe-atoll-35554.herokuapp.com
 /api/%60%0A%09
 // %7D
@@ -261,11 +261,8 @@
 /%60%0A%09
-// 
 %7D%0A%09r
@@ -291,17 +291,17 @@
 calhost:
-3
+5
 000/api/

Change port