@zephr/saas-node-server-sdk

1.1.0 • Public • Published

Zephr NodeJS Server SDK

A NodeJS server SDK to handle Zephr features.

Usage

Modern ES Module

import * as ZephrServer from 'zephr-server-sdk.js';

const zephrServer = ZephrServer.createInstance('ZEPHR_ORG_ID'); // create a server wide instance

// for each users request...
(async () => {
  const jwt = '...'; // secure user jwt token

  const accessController = await zephrServer.createAccessController({ jwt });

  const isFeatureEnabled = await zephrServer.isFeatureEnabled('featureFlag');
  if (isFeatureEnabled) {
    // Handle user access to feature
  } else {
    // Handle feature rejection
  }
})()

Building and running on localhost

First install dependencies:

npm install

To create a build:

npm run build

Readme

Keywords

Package Sidebar

Install

npm i @zephr/saas-node-server-sdk

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

31.6 kB

Total Files

4

Last publish

Collaborators

  • ben-zephr