diff --git a/README.md b/README.md index 52d3a7c8..5ce85c19 100644 --- a/README.md +++ b/README.md @@ -95,21 +95,21 @@ You can generate new functions using the `faas-cli` and built-in templates or us Official templates exist for many popular languages and are easily extensible with Dockerfiles. -* Node.js (`node10-express`) example: +* Node.js (`node12`) example: ```js - "use strict" - - module.exports = (event, context) => { - - context - .headers({"Content-Type": "text/html"}) - .status(200) - .succeed(` -

- 👋 Hello World 🌍 -

`) + "use strict" + + module.exports = async (event, context) => { + return context + .status(200) + .headers({"Content-Type": "text/html"}) + .succeed(` +

+ 👋 Hello World 🌍 +

`); } + ``` *handler.js*