Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danwakeem/serverless-sim
IBM Cloud Function testing framework
https://github.com/danwakeem/serverless-sim
ibm-cloud-functions node-module nodejs openwhisk serverless serverless-sim
Last synced: about 6 hours ago
JSON representation
IBM Cloud Function testing framework
- Host: GitHub
- URL: https://github.com/danwakeem/serverless-sim
- Owner: Danwakeem
- Created: 2018-03-23T00:53:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T19:29:31.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T08:18:44.283Z (7 months ago)
- Topics: ibm-cloud-functions, node-module, nodejs, openwhisk, serverless, serverless-sim
- Language: JavaScript
- Size: 96.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless-sim
[![Build Status](https://travis-ci.org/Danwakeem/serverless-sim.svg?branch=master)](https://travis-ci.org/Danwakeem/serverless-sim)
[![Coverage Status](https://coveralls.io/repos/github/Danwakeem/serverless-sim/badge.svg?branch=master)](https://coveralls.io/github/Danwakeem/serverless-sim?branch=master)This package is a [IBM Cloud Functions](https://console.bluemix.net/openwhisk/) 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](https://console.bluemix.net/openwhisk/).
#### 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.js` would recieve the output of `main.js`, the cli params, and the config file params.
## Change Log
* `0.1.0` - Added function chain and param file support
* `0.0.x` - Initial package with single function execution and param flags