Using the Java and JavaScript APIs
An Equo application usually consists of a Java and a JavaScript part. There are cases in which an Equo application looks like a pure Java application (with only a few lines of JavaScript code), and there are other cases in which it’s very rich in JavaScript, but only with a few lines of Java code. To support all the specific scenarios, Equo provides a set of Java and JavaScript APIs.
Below, a brief description about how the APIs can be consumed:
-
The Java API can be used from the Java code.
-
There is a JavaScript API that is shipped with the Equo SDK, globally available for its usage in the namespace
window.equo
. You don’t have to do anything to use it. -
The JavaScript API is also bundled in Node.js packages. You will have to import the library that you want and use it as a normal Node.js package.
Using JavaScript APIs as Node.js Packages
If you are developing a complete web application for the frontend of your Equo application, it is useful to import and consume the Equo JavaScript APIs as Node.js packages.
For a reference of all JavaScript APIs, click here.
Login to the Equo Registry
Run the following command to set the Equo Npm registry:
npm config set '@equo:registry' https://registry.equo.dev/