All Projects → testdrivenio → openfass-node-restful-api

testdrivenio / openfass-node-restful-api

Licence: MIT License
Simple example of an OpenFaaS RESTful API

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to openfass-node-restful-api

vcenter-connector
Extend vCenter with OpenFaaS
Stars: ✭ 29 (-12.12%)
Mutual labels:  faas, openfaas
node10-express-template
Node.js 10 Express Template for OpenFaaS
Stars: ✭ 26 (-21.21%)
Mutual labels:  faas, openfaas
Time2code
Portable Scalable web code editor to integrate into your sites and learning experiences
Stars: ✭ 294 (+790.91%)
Mutual labels:  docker-swarm, faas
2020
Make your own 2020 ASCII art
Stars: ✭ 26 (-21.21%)
Mutual labels:  faas, openfaas
node8-express-template
Node.js 8 template for OpenFaaS with HTTP via Express.js
Stars: ✭ 16 (-51.52%)
Mutual labels:  faas, openfaas
swarm-gcp-faas
Setup OpenFaaS on Google Cloud with Terraform, Docker Swarm and Weave
Stars: ✭ 15 (-54.55%)
Mutual labels:  docker-swarm, faas
faas-fargate
OpenFaaS on AWS Fargate. Open source Functions as a Service without any infrastructure to manage
Stars: ✭ 50 (+51.52%)
Mutual labels:  faas, openfaas
openfaas-rstats-templates
OpenFaaS templates for R
Stars: ✭ 17 (-48.48%)
Mutual labels:  faas, openfaas
selenium-grid-docker-swarm-test
Distribute automated tests with Selenium Grid and Docker Swarm
Stars: ✭ 28 (-15.15%)
Mutual labels:  docker-swarm
swarmci
Swarm CI - Docker Swarm-based CI system or enhancement to existing systems.
Stars: ✭ 48 (+45.45%)
Mutual labels:  docker-swarm
swarm-monitor
Monitor a Docker Swarm with Blinkt! LED
Stars: ✭ 48 (+45.45%)
Mutual labels:  docker-swarm
aws-docker-swarm
Terraform and helper resources for running a production Docker Swarm on AWS
Stars: ✭ 74 (+124.24%)
Mutual labels:  docker-swarm
dockerX
Examples of amazing Docker/Docker-Compose/Docker Swarm technologies
Stars: ✭ 17 (-48.48%)
Mutual labels:  docker-swarm
dockupdater
Automatically keep your docker services and your docker containers up-to-date with the latest version
Stars: ✭ 76 (+130.3%)
Mutual labels:  docker-swarm
Technology-eBooks-Free
Free eBooks of Latest Technologies
Stars: ✭ 17 (-48.48%)
Mutual labels:  docker-swarm
express-docker-app
Hyperminimal setup of an Express app with Docker. :)
Stars: ✭ 15 (-54.55%)
Mutual labels:  docker-swarm
playing-docker-swarm-docker-machine
Scripts to help you to play with Docker Swarm and Docker Machine
Stars: ✭ 19 (-42.42%)
Mutual labels:  docker-swarm
openwhisk-runtime-dotnet
Apache OpenWhisk Runtime .Net supports Apache OpenWhisk functions written in .Net languages
Stars: ✭ 23 (-30.3%)
Mutual labels:  faas
goodfirstissue
openfaas function to handle webhooks for goodfirstissue github app
Stars: ✭ 20 (-39.39%)
Mutual labels:  openfaas
reactr
Function scheduler for Go & WebAssembly
Stars: ✭ 264 (+700%)
Mutual labels:  faas

OpenFaaS RESTful API w/ Node and Postgres

Simple example of an OpenFaaS RESTful API.

Getting Started

Build the Docker images for the functions:

$ sh build.sh

Initialize Swarm mode:

$ docker swarm init

Deploy:

$ docker stack deploy func --compose-file docker-compose.yml --prune

Create database and movie table:

$ PG_CONTAINER_ID=$(docker ps --filter name=movies-db --format "{{.ID}}")
$ docker exec -ti $PG_CONTAINER_ID psql -U postgres -W
# CREATE DATABASE movies;
# \c movies
# CREATE TABLE movie(id SERIAL, name varchar);
# \q

Test:

$ curl -X POST http://localhost:8080/function/func_api-create -d \
  '{"name":"NeverEnding Story"}'

$ curl http://localhost:8080/function/func_api-read

$ curl -X POST http://localhost:8080/function/func_api-update -d \
  '{"name":"NeverEnding Story 2", "id": "1"}'

$ curl -X POST http://localhost:8080/function/func_api-delete -d \
  '{"id":"1"}'

Deploy to Digital Ocean

deploy-swarm.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].