Base Oso SDK
The Base Oso SDK provides helpers for interacting with Oso Cloud. If you are
using a web framework, we recommend using the integration specific to that web
framework.
Please Note: The SDK is currently released as a developer preview. Do not use this SDK for production workloads.
Install
npm install --save @osohq/node
yarn add @osohq/node
Usage
The Oso SDK should be initialized as early as possible in the main entry module.
import { init } from '@osohq/node';
init({
apiKey: 'YOUR_API_KEY',
})
After the Oso SDK is initialized, you may access it by calling globalOso()
:
import { globalOso } from '@osohq/node';
oso = globalOso();
The Oso SDK may be further configured by setting relevant fields in the ConfigOptions
object passed on init
.