Change the node example in readme to node12

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
Alistair Hey 2020-01-06 21:10:54 +00:00 committed by Alex Ellis
parent 250b3fccda
commit 09b867559d

View File

@ -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(`
<h1>
👋 Hello World 🌍
</h1>`)
"use strict"
module.exports = async (event, context) => {
return context
.status(200)
.headers({"Content-Type": "text/html"})
.succeed(`
<h1>
👋 Hello World 🌍
</h1>`);
}
```
*handler.js*