Update CLI docs to reflect new CLI verb/noun structure (#1031)

Use new CLI syntax
This commit is contained in:
Owen Cliffe
2018-06-08 11:47:04 +01:00
committed by GitHub
parent 1a3b72a05b
commit 456cbed8bd
7 changed files with 14 additions and 14 deletions

View File

@@ -34,7 +34,7 @@ This will create a docker image and push the image to docker.
## Publishing to Fn
```bash
fn routes create <app_name> </path>
fn create route <app_name> </path>
```
This creates a full path in the form of `http://<host>:<port>/r/<app_name>/<function>`

View File

@@ -22,8 +22,8 @@ cat post.json | fn run -e DB_USER=root -e DB_PASS=pass posts/create
fn run -e DB_USER=root -e DB_PASS=pass posts
# Set app configs
fn apps config set blog DB_USER root
fn apps config set blog DB_PASS pass
fn config app blog DB_USER root
fn config app blog DB_PASS pass
# fn deploy it!
fn deploy --all

View File

@@ -17,11 +17,11 @@ fn build
fn deploy --local --app spring-cloud-fn
# Set up a couple of routes for different functions
fn routes create spring-cloud-fn /upper
fn routes config set spring-cloud-fn /upper FN_SPRING_FUNCTION upperCase
fn create route spring-cloud-fn /upper
fn config route spring-cloud-fn /upper FN_SPRING_FUNCTION upperCase
fn routes create spring-cloud-fn /lower
fn routes config set spring-cloud-fn /lower FN_SPRING_FUNCTION lowerCase
fn create route spring-cloud-fn /lower
fn config route spring-cloud-fn /lower FN_SPRING_FUNCTION lowerCase
```
Now you can call those functions using `fn call` or curl:

View File

@@ -13,7 +13,7 @@ Then test with:
```sh
# First, create an app
fn apps create myapp
fn create app myapp
# And test
curl http://localhost:8080/v1/apps
```