base-url
    baseUrl(optionalBaseUrlToSet)
  
  Get and/or set the "base" (containing path) of the document.
var baseUrl = require("can-globals/base-url/base-url");
console.log(baseUrl());           // -> "http://localhost:8080"
console.log(baseUrl(baseUrl() + "/foo/bar")); // -> "http://localhost:8080/foo/bar"
console.log(baseUrl());           // -> "http://localhost:8080/foo/bar"
Parameters
- setUrl {String}:An optional base url to override reading the base URL from the known path. 
Returns
 {String}: 
Returns the set or computed base URL
 GitHub
GitHub Twitter
Twitter