JavaScript SDK
Orkes Conductor JavaScript SDK is maintained here: https://github.com/conductor-sdk/conductor-javascript
Get Conductor JavaScript SDK
Yarn
yarn add @io-orkes/conductor-javascript
NPM
npm install --save @io-orkes/conductor-javascript
Initialization
import {
orkesConductorClient,
} from "@io-orkes/conductor-javascript";
export const config = {
serverUrl: `${process.env.SERVER_URL}`,
};
(async () => {
const clientPromise = orkesConductorClient(config);
const client = await clientPromise;
})();
Authentication Settings (optional)
See Security via Applications or this video for details on how to get an access key and secret.
Once we have a key and secret, we can configure the app from properties or environment variables, as shown in this example:
export const config = {
keyId: process.env.KEY,
keySecret:process.env.SECRET,
serverUrl: `${process.env.SERVER_URL}`,
};
(async () => {
const clientPromise = orkesConductorClient(config);
const client = await clientPromise;
})();
Remember to protect your app secrets like any other secrets or passwords.