Skip to content

Commit

Permalink
Add example json files
Browse files Browse the repository at this point in the history
Add CI status

Rebase resolved

Squash commits

Update top level README

Rollback changes to ci.yaml
  • Loading branch information
Jiaxin Fan authored and Jiaxin Fan committed Feb 6, 2023
1 parent 5a2ae20 commit c3c8503
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ The `core/nodejsActionBase` folder contains the Node.js app server used to imple
This will return the following runtime images with the following names: `action-nodejs-v14`, `action-nodejs-v16`, and `action-nodejs-v18`.

### Testing
( A new section on building and testing the standalone runtime container is available here. )

- Install project dependencies from the top-level Apache OpenWhisk [project](https://github.com/apache/openwhisk), which ensures correct versions of dependent libraries are available in the Maven cache.

Expand All @@ -113,5 +114,4 @@ This will return the following runtime images with the following names: `action-

```
./gradlew :tests:test
```
An update about the details of verifying a standalone container can be found [here](https://github.com/apache/openwhisk-runtime-nodejs/tree/master/docs/users)
```
4 changes: 1 addition & 3 deletions docs/users/standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
-->

# Tests for OpenWhisk NodeJS Runtime as Standalone Container
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)

This README walks you through how to build, customise and test Apache OpenWhisk Node.js runtime images.
## Pre-requisites
- [Gradle](https://gradle.org/)
Expand Down Expand Up @@ -57,7 +55,7 @@ In our example, the `Action` container exposes `port 8080` (see the Dockerfile f
```
docker run --publish 3008:8080 --name=bloom_whisker -i -t action-nodejs-v18:latest
```
A simpler way is to map `port 80 ` on `localhost ` to the container's `port 8080`. The port number assigned to the HTTP protocol is `80`. Since we will be sending actions against the runtime using HTTP, using this number will allow us to omit the port in the request later. Oftentimes, `port 80 ` could already be occupied by another process. Without loss of generality, the following examples will use the arbitrarily chosen `port 3008`.
A simpler way is to map `port 80` on `localhost` to the container's `port 8080`. The port number assigned to the HTTP protocol is `80`. Since we will be sending actions against the runtime using HTTP, using this number will allow us to omit the port in the request later. Oftentimes, `port 80` could already be occupied by another process. Without loss of generality, the following examples will use the arbitrarily chosen `port 3008`.

Lists all running containers
```
Expand Down
3 changes: 3 additions & 0 deletions docs/users/standalone/helloworld/js-params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"value": { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"value": {
"name": "js-helloworld-with-params",
"main" : "main",
"binary" : false,
"code" : "function main(params) { return {payload: 'Hello ' + params.name + ' from ' + params.place + '!!!'} }"
}
}
6 changes: 6 additions & 0 deletions docs/users/standalone/helloworldwithparams/js-run-params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"value": {
"name": "Visitor",
"place": "Earth"
}
}

0 comments on commit c3c8503

Please sign in to comment.