
export const IS_DEV = window.location.hostname === 'localhost' || window.location.port !== '8888';


export const getEndpoint = () => {

    if (IS_DEV) {
        return "http://localhost:8888/chat/widget";
    }

    let fullURL = window.location.href;

    //Remove all after #
    fullURL = fullURL.split('#')[0];

    //Remove all after ?
    fullURL = fullURL.split('?')[0];

    return fullURL;
}

