0.0.8 • Published 7 years ago

tymly-api-mock v0.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

tymly-api-mock

Mock REST API to simulate interactions with Tymly State Machines

Installation

To run the Tymly Mock API, you'll need Node.js installed (version 8.5.0 or higher).

$ npm install tymly-api-mock

Getting started

Before starting, please set following environment variables:

Variable NameDescription
TYMLY_CERTIFICATE_PATHIf you're using the RSA256 (or similar) algorithm as part of your Oauth set-up, then use this environment variable to point to your public key/certificate file, e.g. TYMLY_CERTIFICATE_PATH=d:/tymly-certificate.pem
TYMLY_AUTH_SECRETAlternatively, if you are using a lesser HS256 (or similar) algorithm then use this to configure your secret string, e.g. TYMLY_AUTH_SECRET=Shhh!.
TYMLY_AUTH_AUDIENCESpecifies an audience (aud) to be encoded in test tokens.`
TYMLY_MOCK_USERIDDefines the userId which all requests will refer to e.g. TYMLY_MOCK_USERID=Dave

Running

$ npm start

Testing

$ npm test

License

MIT