docs: minor chores and fixes (#298)

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
This commit is contained in:
Zbynek Roubalik 2021-04-14 19:00:55 +02:00 committed by GitHub
parent 4957b7c6bf
commit ff4892f171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -7,8 +7,6 @@
[![License](https://img.shields.io/github/license/boson-project/func)](https://github.com/boson-project/func/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release/boson-project/func.svg?label=Release)](https://github.com/boson-project/func/releases)
[Demo Screencast]
`func` is a Client Library and CLI for enabling the development of implicitly deployed, platform agnostic code.
[Read the Documentation](docs/README.md)

View File

@ -1,6 +1,7 @@
# Boson Functions
[![Telegram Image Analysis](http://img.youtube.com/vi/CsYo0SmQ0Uk/0.jpg)](https://youtu.be/CsYo0SmQ0Uk "Telegram Image Analysis")
### Telegram Image Analysis Demo Screencast
[![Telegram Image Analysis Demo Screencast](http://img.youtube.com/vi/CsYo0SmQ0Uk/0.jpg)](https://youtu.be/CsYo0SmQ0Uk "Telegram Image Analysis Demo Screencast")
`func` is a Client Library and CLI for enabling the development of implicitly deployed, platform agnostic functions.

View File

@ -1,18 +1,18 @@
# Node.js Developer's Guide
# Node.js Function Developer's Guide
When creating a Node.js function using the `func` CLI, the project directory
looks like a typical Node.js project. Both HTTP and Event functions have the same
template structure.
```
func create
Project path: /home/lanceball/projects/fn
func create fn
Project path: /home/developer/projects/fn
Function name: fn
Runtime: node
Trigger: http
tree
.
tree fn
fn
├── func.yaml
├── index.js
├── package.json
@ -99,7 +99,7 @@ that responds to a `CloudEvent` or simple HTTP. `CloudEvents` in Knative are tra
HTTP as a `POST` request, so in many ways, the two types of functions are very much the same.
They each will listen and respond to incoming HTTP events.
When an inacoming request is received, your function will be invoked with a `Context` object as the first parameter. If the incoming request is a `CloudEvent`, any data associated with the `CloudEvent` is extracted from the event and provided as a second parameter. For example, a `CloudEvent` is received which contains a JSON string such as this in its data property,
When an incoming request is received, your function will be invoked with a `Context` object as the first parameter. If the incoming request is a `CloudEvent`, any data associated with the `CloudEvent` is extracted from the event and provided as a second parameter. For example, a `CloudEvent` is received which contains a JSON string such as this in its data property,
```json
{