diff --git a/examples/tutorial/README.md b/examples/tutorial/README.md index a815e36b7..37da6ca56 100644 --- a/examples/tutorial/README.md +++ b/examples/tutorial/README.md @@ -3,6 +3,18 @@ Welcome to the Fn Getting Started Series, the best way to get started with Fn and serverless computing. +## Prequisites +* [Quickstart](../../README.md) has been completed. + +When starting a new shell, remember to: + +``` +# Log Docker into your Docker Hub account +docker login + +# Set your Docker Hub username +export FN_REGISTRY= +``` ## Hello World Examples diff --git a/examples/tutorial/hello/go/README.md b/examples/tutorial/hello/go/README.md index 2edfad6e7..ed2a84c60 100644 --- a/examples/tutorial/hello/go/README.md +++ b/examples/tutorial/hello/go/README.md @@ -22,15 +22,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-go +curl http://localhost:8080/r/myapp/go ``` -Or call from a browser: [http://localhost:8080/r/myapp/go](http://localhost:8080/r/myapp/hello-go) +Or call from a browser: [http://localhost:8080/r/myapp/go](http://localhost:8080/r/myapp/go) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-go +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/go ``` That's it! diff --git a/examples/tutorial/hello/node/README.md b/examples/tutorial/hello/node/README.md index 1da9b7873..c5c828edb 100644 --- a/examples/tutorial/hello/node/README.md +++ b/examples/tutorial/hello/node/README.md @@ -22,15 +22,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-node +curl http://localhost:8080/r/myapp/node ``` -Or call from a browser: [http://localhost:8080/r/myapp/hello-node](http://localhost:8080/r/myapp/hello-node) +Or call from a browser: [http://localhost:8080/r/myapp/node](http://localhost:8080/r/myapp/node) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-node +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/node ``` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.js` diff --git a/examples/tutorial/hello/php/README.md b/examples/tutorial/hello/php/README.md index d5642117c..69903118a 100644 --- a/examples/tutorial/hello/php/README.md +++ b/examples/tutorial/hello/php/README.md @@ -22,15 +22,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-php +curl http://localhost:8080/r/myapp/php ``` -Or call from a browser: [http://localhost:8080/r/myapp/hello-php](http://localhost:8080/r/myapp/hello-php) +Or call from a browser: [http://localhost:8080/r/myapp/php](http://localhost:8080/r/myapp/php) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-php +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/php ``` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.php` diff --git a/examples/tutorial/hello/python/README.md b/examples/tutorial/hello/python/README.md index 493a50a33..9ed73b952 100644 --- a/examples/tutorial/hello/python/README.md +++ b/examples/tutorial/hello/python/README.md @@ -22,15 +22,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-python +curl http://localhost:8080/r/myapp/python ``` -Or call from a browser: [http://localhost:8080/r/myapp/hello-python](http://localhost:8080/r/myapp/hello-python) +Or call from a browser: [http://localhost:8080/r/myapp/python](http://localhost:8080/r/myapp/python) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-python +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/python ``` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.py` diff --git a/examples/tutorial/hello/ruby/README.md b/examples/tutorial/hello/ruby/README.md index 9deb97d22..b652b469e 100644 --- a/examples/tutorial/hello/ruby/README.md +++ b/examples/tutorial/hello/ruby/README.md @@ -22,15 +22,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-ruby +curl http://localhost:8080/r/myapp/ruby ``` -Or call from a browser: [http://localhost:8080/r/myapp/hello-ruby](http://localhost:8080/r/myapp/hello-ruby) +Or call from a browser: [http://localhost:8080/r/myapp/ruby](http://localhost:8080/r/myapp/ruby) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-ruby +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/ruby ``` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.rb` diff --git a/examples/tutorial/hello/rust/README.md b/examples/tutorial/hello/rust/README.md index 1ec537175..c9f195962 100644 --- a/examples/tutorial/hello/rust/README.md +++ b/examples/tutorial/hello/rust/README.md @@ -49,15 +49,15 @@ fn deploy --app myapp ### Now call your function: ```sh -curl http://localhost:8080/r/myapp/hello-rust +curl http://localhost:8080/r/myapp/rust ``` -Or call from a browser: [http://localhost:8080/r/myapp/hello-rust](http://localhost:8080/r/myapp/hello-rust) +Or call from a browser: [http://localhost:8080/r/myapp/rust](http://localhost:8080/r/myapp/rust) And now with the JSON input: ```sh -curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/hello-rust +curl -H "Content-Type: application/json" -X POST -d @sample.payload.json http://localhost:8080/r/myapp/rust ``` That's it!