April 2018
Intermediate to advanced
250 pages
5h 42m
English
We will try the echoit function to hello world with OpenFaaS. First, clone the project from https://github.com/openfaas/faas with one level of depth to just make the clone process quicker:
$ git clone --depth=1 https://github.com/openfaas/faas
Then, change the directory into faas, and simply deploy the OpenFaaS default stack, using the following command:
$ cd faas$ docker stack deploy -c docker-compose.yml func
Wait until the stack is going up. Then, we do hello world with the curl command:
$ curl -d "hello world." -v http://localhost:8080/function/func_echoit* Trying 127.0.0.1...* Connected to localhost (127.0.0.1) port 8080 (#0)> POST /function/func_echoit HTTP/1.1> Host: localhost:8080> User-Agent: curl/7.47.0> Accept: */* ...
Read now
Unlock full access