GithubHelp home page GithubHelp logo

apache / openwhisk-runtime-deno Goto Github PK

View Code? Open in Web Editor NEW
12.0 31.0 10.0 116 KB

Apache OpenWhisk Runtime Deno supports Apache OpenWhisk functions written in Deno

Home Page: https://openwhisk.apache.org

License: Apache License 2.0

Shell 4.54% Dockerfile 10.99% Makefile 15.89% JavaScript 29.87% TypeScript 4.76% Scala 33.95%
openwhisk apache serverless faas functions-as-a-service cloud serverless-architectures serverless-functions docker functions

openwhisk-runtime-deno's Introduction

Apache OpenWhisk Runtime for Deno

License

This repository contains sources files needed to build the Deno runtimes for Apache OpenWhisk. The build system will produce a Docker image for each runtime version. These images are used in the platform to execute Deno actions.

Try it out using Docker image:

wsk action create hello main.ts --docker=openwhisk/action-deno-1.3.0

The content of the main.ts is shown below.

export default (args: any) => {
  return {
    message: `Hello, ${args.name || 'World'}!`
  }
}

For the return result, not only support dictionary but also support array

So a very simple hello array function would be:

export default (args: any) => {
   return ["a", "b"]
}

And support array result for sequence action as well, the first action's array result can be used as next action's input parameter.

So the function can be:

func main(args: Any) -> Any {
    return args
}

When invokes above action, we can pass an array object as the input parameter.

Development

A Dockerfile for each runtime image is defined in its respective runtime version directory. Modify this file if you need to add extra dependencies to a runtime version.

Build

  • Run the distDocker command to generate local Docker images for the different runtime versions.
./gradlew distDocker

Test

  1. Build the local Docker images for the Deno runtime (see the instructions above).

  2. Install project dependencies from the top-level Apache OpenWhisk project, which ensures correct versions of dependent libraries are available in the Maven cache.

./gradlew install

This command MUST BE run from the directory containing the main Apache OpenWhisk repository, not this repository's directory.

  1. Run the project tests.
./gradlew :tests:test

openwhisk-runtime-deno's People

Contributors

dgrove-oss avatar jbampton avatar ningyougang avatar rabbah avatar satyarohith avatar upgle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openwhisk-runtime-deno's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.