Adding tutorial prerequisites and correcting routes (#423)

* Adding tutorial prerequisites and correcting routes

* Correcting Quickstart link in README.md

* Minor edit to trigger pull request
This commit is contained in:
W Brian Leonard
2018-01-02 11:49:50 -05:00
committed by Reed Allman
parent 250bc645f9
commit 425bcc0954
7 changed files with 30 additions and 18 deletions

View File

@@ -3,6 +3,18 @@
Welcome to the Fn Getting Started Series, the best way to get started with Fn and serverless computing. 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=<DOCKERHUB_USERNAME>
```
## Hello World Examples ## Hello World Examples

View File

@@ -22,15 +22,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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! That's it!

View File

@@ -22,15 +22,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.js`

View File

@@ -22,15 +22,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.php`

View File

@@ -22,15 +22,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.py`

View File

@@ -22,15 +22,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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` That's it! Our `fn deploy` packaged our function and sent it to the Fn server. Try editing `func.rb`

View File

@@ -49,15 +49,15 @@ fn deploy --app myapp
### Now call your function: ### Now call your function:
```sh ```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: And now with the JSON input:
```sh ```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! That's it!