Code Monkey home page Code Monkey logo

aaf-rapid-connect-mock's Introduction

aaf-rapid-connect-mock NPM version Build status

Host a local "mock" instance of AAF Rapid Connect.

Installation

Install the package with NPM:

$ npm install aaf-rapid-connect-mock

Usage

Example:

import mockRapidConnect from "aaf-rapid-connect-mock";

let options = { ... };
mockRapidConnect(options).listen(3000);

As shown, the package exposes a function that returns an Express application instance. The following options can be specified:

  • jwtSecret – The secret key used to sign JWTs. Required!
  • appUrl – The main entry point URL of the application. Defaults to https://example.com.
  • authUrl – The callback URL that JWTs are sent to on sign-in. Defaults to /auth.
  • pageTitle – The title of the sign-in page. Defaults to AAF Rapid Connect.

Tip

To integrate the package into an existing Express application, simply mount it at a path:

import express from "express";
import mockRapidConnect from "aaf-rapid-connect-mock";

let app = express();

if (process.env.NODE_ENV !== "production") {
  let jwtSecret = "secret";
  app.use("/mock", mockRapidConnect({ jwtSecret }));
}

app.listen(3000);

aaf-rapid-connect-mock's People

Contributors

lukehorvat avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.