openfaas-incubator / node8-express-template

Node.js 8 template for OpenFaaS with HTTP via Express.js
MIT License
15 stars 18 forks source link

Proposal 716 #4

Closed telackey closed 6 years ago

telackey commented 6 years ago

Implement proposal 716, pass full paths to functions

This changes the default route to be catch-all, so that it will match any path forwarded by the Gateway and watchdog.

This also adds a path member to the event object for use in the handler.

Tested by deploying example functions which echo back the path.

(NOTE: The Dockerfile reference to the of-watchdog binary will also need updated, but that is not a change I can make, since the of-watchdog binary is not available yet. For testing I used a locally built of-watchdog.)

Signed-off-by: Thomas E Lackey telackey@bozemanpass.com