Create hsdatabase.js

this code was copied from https://github.com/phormanns/hostsharing-play/tree/master/library