Example to show how to build a microservice with Node.js and Express.js with instructions for: OpenFaaS, Docker and Kubernetes
Created for k33g (Philippe Charrière) from GitLab
Run it with OpenFaaS and PLONK
PLONK = Prometheus Linkerd (optional) OpenFaaS NATS and Kubernetes
faas-cli deploy
Access via URL on faas-cli describe service
docker run --name expressjs -p 8080:8080 -ti alexellis2/service:0.3.0
Access from localhost:8080
kubectl apply -f ./yaml
kubectl port-forward deploy/expressjs 8080:8080 &
curl 127.0.0.1:8080
With OpenFaaS Templates you don't need to bother with managing Dockerfiles and TCP-port bindings, unless you like that sort of thing, then you can do that too just like we did in this example.
- Microservice for Node.js with express visible
- Function for Node.js with express hidden
- Legacy Node template without express
Try one of the templates above with faas-cli template store ls/pull
.