Mock REST API to simulate interactions with Tymly State Machines
To run the Tymly Mock API, you'll need Node.js installed (version 8.5.0 or higher).
$ npm install tymly-api-mock
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
|
$ npm start
- By default, the mock API will be available: http://localhost:3210/executions
$ npm test
MIT