New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openfeature/flagd-provider

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openfeature/flagd-provider

Flagd is a simple daemon for evaluating feature flags. It is designed to conform to OpenFeature schema for flag definitions. This repository and package provides the client code for interacting with it via the OpenFeature server-side JavaScript SDK.

  • 0.7.3
  • npm
  • Socket score

Version published
Weekly downloads
4.4K
decreased by-14.72%
Maintainers
2
Weekly downloads
 
Created
Source

Server-side flagd Provider

Flagd is a simple daemon for evaluating feature flags. It is designed to conform to OpenFeature schema for flag definitions. This repository and package provides the client code for interacting with it via the OpenFeature server-side JavaScript SDK.

Installation

$ npm install @openfeature/flagd-provider

Required peer dependencies

$ npm install @openfeature/js-sdk

Usage

The FlagdProvider supports multiple configuration options that determine now the SDK communicates with flagd. Options can be defined in the constructor or as environment variables, with constructor options having the highest precedence.

Available options

Option nameEnvironment variable nameTypeDefault
hostFLAGD_HOSTstringlocalhost
portFLAGD_PORTnumber8013
tlsFLAGD_TLSbooleanfalse
socketPathFLAGD_SOCKET_PATHstring-

Example using TCP

  OpenFeature.setProvider(new FlagdProvider({
      host: 'localhost',
      port: 8013,
  }))

Example using a Unix socket

  OpenFeature.setProvider(new FlagdProvider({
      socketPath: "/tmp/flagd.socks",
  }))

Building

Run nx package providers-flagd to build the library.

NOTE: Buf must be installed to build locally.

Running unit tests

Run nx test providers-flagd to execute the unit tests via Jest.

FAQs

Package last updated on 29 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc