mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* See the hello/go README for how this all works now. * Node support for fnctl auto build * Updated based on PR comments.
Quick Example for a NodeJS Function (4 minutes)
This example will show you how to test and deploy a Node function to IronFunctions.
fnctl init <YOUR_DOCKERHUB_USERNAME>/hello
fnctl build
# test it
cat hello.payload.json | fnctl run
# push it to Docker Hub for use with IronFunctions
fnctl push
# Create a route to this function on IronFunctions
fnctl routes create myapp /hello YOUR_DOCKERHUB_USERNAME/hello:0.0.X
# todo: Image name could be optional if we read the function file for creating the route. Then command could be:
fnctl routes create myapp /hello
Now surf to: http://localhost:8080/r/myapp/hello