VWO Feature Management and Experimentation SDK for Node.js
Requirements
Installation
npm install vwo-fme-node-sdk --save
yarn add vwo-fme-node-sdk
Example
const { init } = require('vwo-fme-node-sdk');
const vwoClient = await vwo.init({
accountId: '123456',
sdkKey: '32-alpha-numeric-sdk-key'
});
const userContext = { id: "unique_user_id" };
const getFlag = await vwoClient.getFlag('feature_key', userContext);
const isFlagEnabled = getFlag.isEnabled();
const intVar = getFlag.getVariable('int_variable_key');
vwoClient.trackEvent('addToCart', userContext, eventProperties);
Development Scripts
- Install dependencies and bootstrap git-hooks
yarn install
- Compile TypeScript code to JavaScript(ES6)
yarn tsc
- To run tests:
yarn run test:prod
yarn run test:dev
Contributing
Please go through our contributing guidelines
Code of Conduct
Code of Conduct
License
Apache License, Version 2.0
Copyright 2024 Wingify Software Pvt. Ltd.