rabbah commented on a change in pull request #1: Adding initial sources for 
Ballerina runtime
URL: 
https://github.com/apache/incubator-openwhisk-runtime-ballerina/pull/1#discussion_r204441438
 
 

 ##########
 File path: README.md
 ##########
 @@ -1 +1,117 @@
-# incubator-openwhisk-runtime-ballerina
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+# Apache OpenWhisk Runtime for Ballerina
+[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+[![Build 
Status](https://travis-ci.com/apache/incubator-openwhisk-runtime-ballerina.svg?branch=master)](https://travis-ci.com/apache/incubator-openwhisk-runtime-ballerina)
+
+This repository contains the [Ballerina](https://ballerinalang.org) runtime 
for the Apache OpenWhisk serverless platform.
+
+### Prerequisites
+
+The following prerequisites are needed to try this out:
+
+- [Ballerina](https://ballerina.io/downloads/) >= 0.975.0
+
+### Creating a Ballerina function
+
+Create a file `hello.bal` for your Ballerina function with the following code:
+
+```ballerina
+import ballerina/io;
+function main(string... args) {
+  io:println("started");
+}
+function run(json jsonInput) returns json {
+  io:println(jsonInput);
+  json output = { "response": "hello-world"};
+  return output;
+}
+```
+
+The Ballerina file should include:
+ - `main(string... args)` and
+ - `run(json jsonInput)`.
+
+The first is necessary to compile the function but does not execute when you
+invoke the action.
+
+### Compiling your function
+
+Run the [Ballerina](https://ballerina.io/downloads) compiler to
+build your function.
+```bash
+ballerina build hello.bal
+```
+
+This generates an executable `hello.balx`. You will use this binary to create
+the OpenWhisk action.
+
+### Creating and invoking your Ballerina action
+
+Use the OpenWhisk [`wsk` 
CLI](https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md)
+to create your Ballerina action.
+
+```bash
+wsk action create hello hello.balx --docker openwhisk/balaction
 
 Review comment:
   the docker image should follow standard convention: action-ballerina-v0.975 
for example.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to