0.10.0 • Published 5 months ago
@openziti/ziti-sdk-browser v0.10.0
ziti-sdk-browser as a CommonJS module or ES module
This package allows ziti-sdk-browser to be imported as a CommonJS module or ES module.
Installation
Use npm to install the ziti-sdk-browser module:
npm install @openziti/ziti-sdk-browserOr, use yarn to install the ziti-sdk-browser module:
yarn add @openziti/ziti-sdk-browserUsage
createZitiBrowserClient
This function returns a Promise that resolves with a newly created
ZitiBrowserClient object once ziti-sdk-browser has loaded. If you call
createZitiBrowserClient in a server environment (e.g. NodeJS) it will resolve
to null.
import { createZitiBrowserClient } from '@openziti/ziti-sdk-browser';
zitiBrowserClient = await createZitiBrowserClient({
logLevel: 'trace', // select your console logLevel (default is 'warn')
logPrefix: 'MyApp', // specify whatever prefix you want
authorizationParams: {
controllerHost: 'YOUR_ZITI_CONTROLLER_HOSTNAME',
controllerPort: 443, // (default is 443)
},
});TypeScript support
This package includes TypeScript declarations. We support projects using TypeScript versions >= 4.8.0