Skip to content

openziti/ziti-sdk-browser

Repository files navigation

@openziti/ziti-sdk-browser

A JavaScript runtime you can embed into your web app to create a Zitified web app. This SDK is intended to run in web browsers (not NodeJS). This SDK allows you to run a web server resources in a private, invisible-to-the-internet VPC, and _still_ make REST calls to those protected resources, from your web app, but only for authorized users of your web app.

Part of the OpenZiti Zero Trust stack


Are you interested in knowing how to easily embed programmable, high performance, zero trust networking into your app, on any internet connection, without VPNs?
Learn more about our OpenZiti project by clicking here:


Build Issues npm version License PRs Welcome Contributor Covenant



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-browser

Or, use yarn to install the ziti-sdk-browser module:

yarn add @openziti/ziti-sdk-browser

Usage

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

Documentation

About

A JavaScript-based SDK for delivering secure browser-based web applications over a Ziti Network

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •