File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -11,29 +11,33 @@ This CLI can be used to build and deploy functions to FaaS.
1111This will generate a Docker image for Node.js.
1212
1313```
14- $ faas-cli -action=build -image=alexellis2/hello-function
14+ $ ./faas-cli -action=build -image=alexellis2/hello-function -name=hello-function -handler=./samples/info
15+
1516Building: alexellis2/hello-cli with Docker. Please wait..
17+ ...
1618Image: alexellis2/hello-cli built.
1719```
1820
1921This will use the handler.js file found in the template/node folder to build a Docker image containing the FaaS watchdog.
2022
2123** Deploy the Docker image as a FaaS function:**
2224
23- Now we can deploy the image as ` hellofunction ` .
25+ Now we can deploy the image as a named function called ` hello-function ` .
2426
2527```
26- $ faas-cli -action=deploy -image=alexellis2/hello-function -name=hellofunction
28+ $ ./faas-cli -action=deploy -image=alexellis2/hello-function -name=hello-function
29+
2730200 OK
28- URL: http://localhost:8080/function/hellofunction
31+
32+ URL: http://localhost:8080/function/hello-function
2933```
3034
3135** Accessing the function:**
3236
3337You can pass input with the ` -d ` flag or ` --data-binary @filename.txt ` to send a whole file including newlines.
3438
3539```
36- $ curl -d '{"hello": "world"}' http://localhost:8080/function/hellofunction
40+ $ curl -d '{"hello": "world"}' http://localhost:8080/function/hello-function
3741```
3842
3943** Installation (require Go 1.7 or later)**
You can’t perform that action at this time.
0 commit comments