Files
hpcore/examples/js_client/README.md
Ravin Perera 6a8f449d5b Introduced bson support for browser js client lib. (#308)
* Added blake3 import and safari compatibility fix.
* Created browser lib with bson support.
* Added 'terser' for minification.
* Added TextEncoder compatiblity fix.
2021-05-13 15:14:29 +05:30

799 B

Hot Pocket javascript client library and examples

Single-file javascript library to support json and bson protocols in NodeJs and Browser environments.

NodeJs

  1. Run npm install to install all the dependencies.
  2. lib/hp-client-lib.js is the Hot Pocket client library for NodeJs.
  3. text-client.js is the example for json mode.
  4. file-client.js is the example for bson mode.

Browser

  1. Run npm install to install all the compilation dependencies.
  2. Run npm run build-browser to produced the minified library for the browser.
  3. browser-example.html is the simple html/javascript example for json mode.

(For BSON support in browser, a slightly modified version of https://www.npmjs.com/package/bson is used. The minified library includes this bson support library as well)