"use strict";

// set the base path based on the config. This allows the app to exist under a different path. Eg. setting urlBasePath to
// test means the app will be under <HOST_NAME>/test instead of just <HOST_NAME>/
var urlBase = config.get("urlBase");

var basePath = "", basePathWithDomain = "";
if (urlBase) {
    var basePath = urlBase.path;
    basePathWithDomain = (urlBase.domain ? urlBase.domain : '') + "/" + basePath;
}

module.exports = {
    basePath: basePath,
    basePathWithSlashPrefix: "/" + basePath,
    basePathWithDomain: basePathWithDomain
};
