0.1.5 • Published 2 years ago

@flagsio/js-sdk v0.1.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Build Status Npmjs Contributors Forks Stargazers Issues License LinkedIn Twitter

Table of Contents

Overview

Flagsio is an easy-to-use, real-time feature management platform that helps teams build better software, faster. Get started using Flagsio today!

Getting started

To run any of the example client apps locally follow these steps.

Prerequisites

Installation

  1. Install the SDK package
    npm install @flagsio/js-sdk
  2. Build
    npm run build

Local development

  1. Clone the repo
    git clone https://github.com/flagsio/js-sdk.git
  2. Install NPM packages
    npm install
  3. Build
    npm run build

Usage

Browser Client:

Import SDK

// /browser path contains a polyfilled bundle of the SDK for browsers 
import FlagsioSdk from "@flagsio/js-sdk/browser"; 

Connect once in the entry point of your app

app.js:

const ENV_ID = 'ENTER YOUR ENVIRONMENT ID';
const API_KEY = 'ENTER YOUR API KEY';

FlagsioSdk.connect(ENV_ID, API_KEY, {
    debug: true, // enabling will print logs to the console during runtime
});

Anywhere in your application

const isEnabled = FlagsioSdk.hasFeature("example-feature", false);

if (isEnabled) {
    // do something when example feature is enabled
} else {
    // do something else
}

NodeJS Client:

Import SDK

// root path contains a bundle of the SDK for NodeJS 
import FlagsioSdk from "@flagsio/js-sdk"; 

Connect once in the entry point of your app

app.js:

const ENV_ID = 'ENTER YOUR ENVIRONMENT ID';
const API_KEY = 'ENTER YOUR API KEY';

FlagsioSdk.connect(ENV_ID, API_KEY, {
    debug: true, // enabling will print logs to the console during runtime
});

Anywhere in your application

const isEnabled = FlagsioSdk.hasFeature("example-feature", false);

if (isEnabled) {
    // do something when example feature is enabled
} else {
    // do something else
}

For more examples, please refer to the Documentation

Roadmap

  • TODO

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this project better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

See CONTRIBUTING.md for more information on how to contribute to our project.

License

Distributed under the Apache License, Version 2.0 License.See LICENSE.txt for more information.

Contact

Flagsio Team - @FlagsioDotCom - github@flagsio.com

Project Link: https://github.com/flagsio/js-sdk/

Website Link: https://www.flagsio.com/

Acknowledgments

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago