Installing the JavaScript SDK
Installing from NPM
The JavaScript SDK is available as a package on NPM. To install the SDK from NPM:
- npm
- yarn
npm install appflags --save
yarn add appflags
Once the SDK is installed in your project, import AppFlags into your code:
import AppFlags from "appflags";
Installing from CDN
To install the AppFlags SDK directly into your webpage, you can load the SDK using a script tag.
Place this script tag in the <head>
section of your HTML.
<script src="https://unpkg.com/appflags/bundle/appflags.js"></script>
Importing this script will make the AppFlags
client object globally available on your website.