Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 2.3 KB

serverless-developing-nodejs-functions.adoc

File metadata and controls

37 lines (25 loc) · 2.3 KB

Developing Node.js functions

After you have created a Node.js function project, you can modify the template files provided to add business logic to your function.

Prerequisites

About invoking Node.js functions

When using the kn CLI to create a function project, you can generate a project that responds to CloudEvents, or one that responds to simple HTTP requests. CloudEvents in Knative are transported over HTTP as a POST request, so both function types listen for and respond to incoming HTTP events.

Node.js functions can be invoked with a simple HTTP request. When an incoming request is received, functions are invoked with a context object as the first parameter.

Next steps