Skip to content

Instantly share code, notes, and snippets.

@ruslander
Created July 29, 2016 21:01
Show Gist options
  • Save ruslander/51d3680db06a6b77e289794cfbda6945 to your computer and use it in GitHub Desktop.
Save ruslander/51d3680db06a6b77e289794cfbda6945 to your computer and use it in GitHub Desktop.
Bounded context, Compose Uis
-- plugin bounded.ctx.js
var getHostnameFromUrl = function (url) {
var urlParser = document.createElement("a");
urlParser.href = url;
return window.location.protocol + "//" + urlParser.host;
};
var boundedContextHostUrl = $("#boundedContextHost").attr("src");
var cssUrl = resourceUrl.replace("bounded.ctx.js", "bounded.ctx.css");
$("head").append($("<link rel=\"stylesheet\" href=\"" + cssUrl + "\" type=\"text/css\" />"));
-- consumer
<script id="boundedContextHost" src="//0.0.0.0:8888/bounded.ctx.js" type="text/javascript"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment