import { SERVER_PORT } from 'core/constants/urls'; export const API_HOSTNAME = window.location.hostname; export const getServerUrl = url => String.prototype.concat( (process.env.NODE_ENV === 'development' && `http://${API_HOSTNAME}:${SERVER_PORT}`) || '', url || '', );