Skip to content

Commit 47a16de

Browse files
authored
Update README.md
1 parent e2581ec commit 47a16de

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,33 @@ This CLI can be used to build and deploy functions to FaaS.
1111
This 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+
1516
Building: alexellis2/hello-cli with Docker. Please wait..
17+
...
1618
Image: alexellis2/hello-cli built.
1719
```
1820

1921
This 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+
2730
200 OK
28-
URL: http://localhost:8080/function/hellofunction
31+
32+
URL: http://localhost:8080/function/hello-function
2933
```
3034

3135
**Accessing the function:**
3236

3337
You 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)**

0 commit comments

Comments
 (0)