3 ms·
It would be nice to see an example of a function that accepts POST, btw., since that would make it easy to do a long-running function that took advantage of rec
by rcarmo 10y ago
It would be nice to see an example of a function that accepts POST, btw., since that would make it easy to do a long-running function that took advantage of recurring requests to cache/optimize parts of a computation.
I went through the repo and didn't spot anything obvious (might have missed it).
- alexellisuk 10y agoThe post is handled in the watchdog function which is embedded into each function. https://github.com/alexellis/faas/blob/master/watchdog/main.go https://github.com/alexellis/faas/blob/master/watchdog/main.... All sample functions are using a POST - within your function you receive that value through STDIN and output response via STDOUT. Example Alexa Skill: https://github.com/alexellis/faas/blob/master/sample-functions/ChangeColorIntent/handler.js https://github.com/alexellis/faas/blob/master/sample-functio... Markdown example: https://github.com/alexellis/faas/tree/master/sample-functions/MarkdownRender https://github.com/alexellis/faas/tree/master/sample-functio...