hook-javascript
hook-javascript copied to clipboard
Browser/JavaScript client for hook.
allow to include it via browserify
It should be possible to have different users authenticated on multiple locations at once, such as "/", and "/admin".
As a shortcut for `.get().then(function() { })`: ``` hook.get('/url', function() { }) hook.post('/url', function() { }) ```
When the server responds with `throw new Exception(...)`, the client is not being able to parse the JSON response.
Maybe we should allow to configure the duration of auth token when registering / logging in.
Related issue: https://github.com/doubleleft/hook-javascript/issues/26
Dependencies that we need to decouple: https://github.com/doubleleft/hook-javascript/blob/dev/bower.json#L24-L25 - **EventSource**: http://caniuse.com/#feat=eventsource - **File upload:**: http://caniuse.com/#feat=fileapi - **Blob**: http://caniuse.com/#feat=blobbuilder
Something like: - http://mozilla.github.io/localForage/ - https://github.com/daleharvey/pouchdb