hoodiehq / hoodie-client

:dog: Client API for the Hoodie server
Apache License 2.0
34 stars 25 forks source link

make `url` a required option #105

Closed gr2m closed 7 years ago

gr2m commented 7 years ago

Originally we expected @hoodie/client to run in browsers only, but we realized that we have to make it compatible with ServiceWorker and Node.js, too (e.g. for server-side rendering).

Currently url is optional and it defaults to location.origin, which only exists in browsers. So instead we should make this a required option, and default options.url to location.origin in the hoodie’s bundle code for /hoodie/client.js

gr2m commented 7 years ago

Thanks for picking it up @sdvg! :)