Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Client builds should be static #16

binocarlos opened this Issue · 0 comments

1 participant


digger-serve should not be concerned with building client javascript - they should be delivered as static files once built (from CDN or somewhere)

Then - you 'connect' to servers using whatever supplychain's that have been registered.

This means you can run a multi-digger page that uses Sockets to connect to one server and XHR to another:

The static client library (digger-client for browser):

<script src=""></script>
var digger1 = $digger.supplychain('', 'socket');
var digger2 = $digger.supplychain('', 'xhr');

var warehouse1 = digger1.connect('/my/db');
var warehouse2 = digger2.connect('/my/db2');

More importantly than connecting to 2 different servers is that the supplychain implementation is totally separated from the digger-client static file.

To do this we need a way of registering supplychains:

$digger.supplychain.register('socket', require('digger-sockets'));
$digger.supplychain.register('xhr', require('digger-xhr'));

This also means we can write LocalStorage supplychains and have a whole digger app in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.