tymly-api-mock
v0.0.8
Published
Mock REST API to simulate interactions with Tymly State Machines
Downloads
4
Readme
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 Name | Description |
| ---------------------- | ----------- |
| TYMLY_CERTIFICATE_PATH | If 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_SECRET | Alternatively, 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_AUDIENCE | Specifies an audience (aud
) to be encoded in test tokens.
| TYMLY_MOCK_USERID | Defines the userId which all requests will refer to e.g.
TYMLY_MOCK_USERID=Dave`
Running
$ npm start
- By default, the mock API will be available: http://localhost:3210/executions
Testing
$ npm test
License
MIT