0

How to integrate cube.js API in simple javascript code? I just want to use cube.js API in my simple html and js page. Can anybody help me with that?

In cube.js docs, they integrate it with react, vue and angular.

1 Answers1

0

Just use XHR or fetch API to send HTTP requests and process the JSON response. The HTTP requests and responses are pretty well documented here for cURL: https://cube.dev/docs/rest-api The most problematic part is sending the JWT from the browser, because it can be easily stolen by your users. Better to call cube.js from server side not directly from the browser because of this. Or at least give the JWT a short expiration time. https://cube.dev/docs/security

inf3rno
  • 24,976
  • 11
  • 115
  • 197