Files
fn-serverless/examples/inputs
Travis Reeder 64c6118313 Removed a bunch of old examples. (#502)
* Removed a bunch of old examples.

* moved grafana back.

* Bumping, circle didn't do build... ?
2017-11-16 10:10:03 -08:00
..
2017-10-25 14:57:50 +02:00
2017-10-25 14:57:50 +02:00

Tutorial 1: Go Function w/ Input (3 minutes)

Example for using required and optional environment variables defined in the func.yaml file.

Try running the following:

fn run
# > ERROR: required env var SECRET_1 not found, please set either set it in your environment or pass in `-e SECRET_1=X` flag.
SECRET_1=YOOO fn run
# > info: optional env var SECRET_2 not found.
# > {"SECRET_1":"YOOO","SECRET_2":"","message":"Hello World"}
SECRET_1=YOOO SECRET_2=DAWG fn run
# > {"SECRET_1":"YOOO","SECRET_2":"DAWG","message":"Hello World"}