Configly React Library

The Ruby library for Configly: the modern config/static data key/value store.

npm GitHub

Table of Contents

What is Configly?

Configly is the place software developers put their static / config data—like copy, styling, and minor configuration values. They can then update that data directly from https://www.config.ly without having to wait for a deploy process / app store review. Their app or webapp receives the data near instantly. Non-technical folks themselves can publish changes freeing developers to focus on hard software problems and not copy tweaks.

On the backend, Configly provides a read-optimized static-data key/value store built with the aim of being low-latency, and high-availability. The client libraries are made to be dead-simple, lean, and efficient (via enhancements like caching). There is a fancy web UI called the Configulator for setting and updating the configs as well as seeing things like change history. Configly is built for modern software development.

There are a host of other benefits to using Configly ( such as ensuring you do not have data duplicated across clients, reducing load on your primary DB, and better tolerance for traffic spikes), read more about the benefits at Configly.

Core Features

  • API to fetch Strings, JSON Blobs (arrays and objects), Booleans, and Numbers from the Configly backend
  • Web interface for modifying these values without having to deploy code (we call our beloved web interface the Configulator).
  • High availability, high-throughput, low-latency backend.
  • Smart caching on the client libraries to minimize server requests.
  • Client libraries available in an expanding amount of languages.

Getting Started

Get your API Key

You'll need a Configly account. Registration is lightning quick—you can register via visiting https://www.config.ly/signup.

After signing up, you can grab your API Key from https://www.config.ly/register. You'll need your API Key to setup the API below.

Library installation

gem install configly-ruby

You will need to set the CONFIGLY_API_KEY environment variable.

If you want to use the optional websocket library, you can set:

CONFIGLY_KEYS_TO_PRELOAD=test1,test2,test3 (these are the keys you want to use)
CONFIGLY_USE_WS=true

Usage

To fetch a key, use the following command:

Configly::Client.get(KEY)

If the key doesn't exist (or if you are using the websockets client and it hasn't been prefetched), this will rais a Configly::KeyError

License

This repository is published under the MIT license.