Init image for fnproject which can be used to create fn functions in php.
Fn function uses fn-php-fdk to make it easy to create functions.
Build new version of this init-image using the build.sh included in this repository.
- Create new function
fn init --init-image tkotosz/fn-php-init myfunc
- Deploy it
fn -v deploy --local --app myapp myfunc
- Run it
fn invoke myapp myfunc
You should see the result:
{"message":"Hello World"}
or
echo -n '{"name":"Tom"}' | fn invoke myapp myfunc
You should see the result:
{"message":"Hello Tom"}
For more examples see the examples in the fn-fdk-php repository.