serverless-sim v0.1.5
Serverless-sim
This package is a IBM Cloud Functions simulation framework. It is meant to allow you to test actions on your local computer with out pushing code to your IBM Cloud Functions account.
Installation
npm i -g serverless-sim
Usage
These examples are located in the root directory for your IBM Cloud Function.
Basic function
serverless-sim ./main.js
Function with params
You can add more --param keys as needed
serverless-sim ./main.js --param key value
Function params loaded via a config file
You can load params from a file in conjunction with add cli params.
serverless-sim ./main.js --param key value --severlessConfig ./config.file.json
Chained functions
The output from the first function will be routed to the second function to simulate a Cloud Function sequence. It can also be used in conjunction with params.
serverless-sim ./main.js ./main2.js --param key value --serverlessConfig ./config.file.json
Note: Both functions in the chain will recieve the cli and config file params. So in this example
main2.jswould recieve the output ofmain.js, the cli params, and the config file params.
Change Log
0.1.0- Added function chain and param file support0.0.x- Initial package with single function execution and param flags