mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 22:33:23 +00:00
Make more concise
This commit is contained in:
@ -15,23 +15,12 @@ Use this FaaS function to resize an image with ImageMagick.
|
|||||||
```
|
```
|
||||||
# curl -sSL https://get.openfaas.com | sudo sh
|
# curl -sSL https://get.openfaas.com | sudo sh
|
||||||
|
|
||||||
# ./faas-cli -action=deploy -image=functions/resizer -name=resizer \
|
# faas-cli -action=deploy -image=functions/resizer -name=resizer \
|
||||||
-fprocess="convert - -resize 50% fd:1"
|
-fprocess="convert - -resize 50% fd:1"
|
||||||
200 OK
|
200 OK
|
||||||
URL: http://localhost:8080/function/resizer
|
URL: http://localhost:8080/function/resizer
|
||||||
```
|
```
|
||||||
|
|
||||||
* Option 3 - use `curl` to deploy the function
|
|
||||||
```
|
|
||||||
$ curl -s --fail localhost:8080/system/functions -d \
|
|
||||||
'{
|
|
||||||
"service": "resizer",
|
|
||||||
"image": "functions/resizer",
|
|
||||||
"envProcess": "convert - -resize 50% fd:1",
|
|
||||||
"network": "func_functions"
|
|
||||||
}'
|
|
||||||
```
|
|
||||||
|
|
||||||
**Resize a picture by 50%**
|
**Resize a picture by 50%**
|
||||||
|
|
||||||
Now pick an image such as the included picture of Gordon and use `curl` or a tool of your choice to send the data to the function. Pipe the result into a new file like this:
|
Now pick an image such as the included picture of Gordon and use `curl` or a tool of your choice to send the data to the function. Pipe the result into a new file like this:
|
||||||
|
Reference in New Issue
Block a user