mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Update CLI docs to reflect new CLI verb/noun structure (#1031)
Use new CLI syntax
This commit is contained in:
@@ -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>`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user