flux-sdk-node

0.5.2 • Public • Published

Flux Node SDK

Installation

  1. Install Node >= 4 Earlier versions may work, but should be used with caution.
  2. npm install --save flux-sdk-node
  3. Have fun!

Environment Configuration

NODE_ENV: By default, the SDK runs in debug/development mode. Set NODE_ENV to production to exit development mode.

Development

flux-sdk-node provides a thin wrapper around flux-sdk-common in order to set up a node-specific environment (e.g., it sets up web sockets). Most development happens in flux-sdk-common.

Testing

flux-sdk-node contains end-to-end tests. The core test suite is located in flux-sdk-node/spec.

NOTE: Unfortunately, the end-to-end test suite is currently very stateful. This affects both writing and running tests.

This test suite requires the following environment configuration:

CLIENT_ID: Your (test) client ID

CLIENT_SECRET: Your (test) client secret

FLUX_URL: The URL of the Flux genie server you are testing against.

TEST_EMAIL: Your test account's email address

TEST_PASSWORD: Your test account's password

DEBUG (default: false): Set to true to make Nightmare visible

EXAMPLE_PORT (default: 4567): Set to change the port used in any tests that set up a full server (i.e., the auth flow tests).

SKIP_AUTH_FLOW (default: false): Set to bypass the auth flow when running tests. This requires ACCESS_TOKEN and FLUX_TOKEN to be set.

ACCESS_TOKEN: Set if using SKIP_AUTH_FLOW is true. Must be a valid token, e.g., from an existing session.

FLUX_TOKEN: Set if using SKIP_AUTH_FLOW is true. Must be a valid token that corresponds to the provided ACCESS_TOKEN.

Environment

Step by step instructions for Flux employees on how to set up the environment are here: https://docs.google.com/document/d/1joaFumoetcAfN9xCU-ND7vr2dMUXPGaNqa6syz_EqyU/edit#

Readme

Keywords

none

Package Sidebar

Install

npm i flux-sdk-node

Weekly Downloads

3

Version

0.5.2

License

MIT

Last publish

Collaborators

  • javiz
  • kylegmaxwell
  • alcorn
  • daishiflux