From 191fdb032190a29636413488f8eee5bdc0236b48 Mon Sep 17 00:00:00 2001
From: Alex <alexellis2@gmail.com>
Date: Thu, 22 Dec 2016 17:14:50 +0000
Subject: [PATCH] Full run through

---
 README.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/README.md b/README.md
index f52872a7..02a72061 100644
--- a/README.md
+++ b/README.md
@@ -24,3 +24,24 @@ This binary fwatchdog acts as a watchdog for your function. Features:
 * Only lets processes run for set duration i.e. 500ms, 2s, 3s.
 * Language/binding independent
 
+Complete example:
+=================
+
+```
+# docker network create --driver overlay --attachable functions
+# git clone https://github.com/alexellis/faas && cd faas
+# cd watchdog
+# ./build.sh
+# docker build -t catservice .
+# docker service rm catservice ; docker service create --network=functions --name catservice catservice
+# cd ..
+# cd gateway
+# docker build -t server . ;docker rm -f server; docker run -v /var/run/docker.sock:/var/run/docker.sock --name server -p 8080:8080 --network=functions server
+```
+
+Accessing the `cat` (read echo) service:
+
+```
+# curl -X POST -H 'x-function: catservice' --data-binary @/etc/hostname -v http://localhost:8080/curl -X POST -H 'x-function: catservice' --data-binary @$HOME/.ssh/known_hosts -v http://localhost:8080/
+```
+
-- 
GitLab