Skip to content

Utility class to help running JavaScript functions as OpenWhisk Actions.

License

Notifications You must be signed in to change notification settings

jthomas/whiskify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whiskify

Utility class to help running JavaScript functions as OpenWhisk Actions.

why?

"Serverless" cloud platforms let us create simple "microservices" from JavaScript functions.

This library helps you convert normal JavaScript functions to ephemeral "microservices" and interact with them as local functions.

We can now choose to move computations from the local machine to a scalable cloud platform with minimal code changes.

installation

npm install whiskify

usage

const whiskify = require('whiskify')({api: 'https://', api_key: '...', namespace: '...'})
const action = whiskify(function (item) { return item + 1; })

action(1).then(function (result) {
  // == 2
})

action.map([1, 2, 3, 4]).then(function (result) {
 // == [2, 3, 4, 5]
})

action.delete() 

limitations

OpenWhisk Actions currently execute using Node.js v6.9.1. Functions must not use features not available on this platform, e.g. async/await.

About

Utility class to help running JavaScript functions as OpenWhisk Actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published