A wrapper for AWS's [Step Functions Local](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html).
npm install stepfunctions-localhostA wrapper for AWS's Step Functions Local.
Heavily inspired by dynamodb-localhost.
- Java Runtime Engine (JRE) version 6.x or newer
npm install stepfunctions-localhost
``javascript
const StepFunctionsLocal = require('stepfunctions-localhost');
const stepfunctionsLocal = new StepFunctionsLocal();
(async () => {
await stepfunctionsLocal.install();
stepfunctionsLocal.start({}).on('data', data => console.log(data.toString()));
setTimeout(() => {
stepfunctionsLocal.stop();
stepfunctionsLocal.remove();
}, 5000);
})();
`
This will download the files required to run step functions, start the step function server, wait 5 seconds, then stop the server and clean up after itself.
Creates a new instance. options defaults to {quiet = false, path = './.step-functions-local'}.
Downloads files required to run step functions. Path defaults to ./.step-functions-local.
Returns Promise.
Starts the local server. Options match those of the actual step function server:
`bash`
-account,--aws-account
this is also the account of your Lambda and other resources.
By Default, it is set to [123456789012], this is NOT a real account id.
-batchEndpoint,--batch-endpoint
e.g. http://localhost:4574
-dynamoDBEndpoint,--dynamodb-endpoint
e.g. http://localhost:4574
-ecsEndpoint,--ecs-endpoint
e.g. http://localhost:4574
-glueEndpoint,--glue-endpoint
e.g. http://localhost:4574
-h,--help Show this help information.
-lambdaEndpoint,--lambda-endpoint
e.g. http://localhost:4574
-region,--aws-region
this is also the region of other AWS resources referred in the state machine.
By Default, it is set to [us-east-1].
-sageMakerEndpoint,--sagemaker-endpoint
e.g. http://localhost:4574
-snsEndpoint,--sns-endpoint
e.g. http://localhost:4574
-sqsEndpoint,--sqs-endpoint
e.g. http://localhost:4574
-v,--version Show the version and build of Step Functions Local.
-waitTimeScale,--wait-time-scale
e.g. 0.5 means cut the original wait time to half
e.g. 0 means no wait time
e.g. 2 means double the original wait time
For example, to set the account ID, the options object would be {account: 'fake-account-id'}`.
Returns the stdout stream of the spawned server process.
Stops the currently running instance.
Removes local files that have been downloaded.