boson-project / buildpacks

Boson Project function buildpacks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boson Project Buildpacks

This repository contains the necessary code to create CNCF buildpacks for functions.

Usage

Run make all to ensure that you have all of the necessary images created and available in your local Docker daemon.

Building a Sample Node.js Application

Set your default builder to the one that you just created.

pack set-default-builder quay.io/boson/faas-nodejs-builder

Then you can build a Node.js function app.

pack build hello-nodejs -p apps/hello-nodejs

Run the app using Docker

docker run --rm -p 8080:8080 hello-nodejs

Send the app a Cloud Event

curl -X POST -d '{"hello": "world"}' \
    -H'Content-type: application/json' \
    -H'Ce-id: 1' \
    -H'Ce-source: cloud-event-example' \
    -H'Ce-type: dev.knative.example' \
    -H'Ce-specversion: 1.0' \
    http://localhost:8080

About

Boson Project function buildpacks

License:Apache License 2.0


Languages

Language:Shell 45.7%Language:Go 36.4%Language:Dockerfile 16.1%Language:Makefile 1.8%