This getting started guide will guide you on setting up HALO SDK for JavaScript in a few minutes. We will provide a step by step guide to get everything working with the most basic setup, for more detailed information please check the documentation:
https://mobgen.github.io/halo-documentation/docs/javascript/javascript_home
Getting started
Step 1: Add the HALO SDK
Install the Halo SDK npm dependency:
npm install --save @mobgen-halo/halo-sdk-js
Step 2: Add HALO configuration
Import config from halo-sdk and apply the basic configuration based on your HALO project. Here you have the minimal configuration you will need.
; config;
Step 3: Request a authToken
To start using the halo-sdk, you first need to receive a authToken.
; const authToken = await auth;
Step 4: Obtain your HALO content
Use a search query to obtain the content you need, for example specifying the content module name and the item name.
; const query = ; const searchResult = await content;
Step 5: Start using HALO in your app
Use any of the HALO APIs or plugins without worrying when is it ready, since this is managed internally by the different libraries.