Upgrades the node environment to NodeJS 7.6.0. Functions can now use async/await and promises; they can return a promise instead of using a callback. The change preserves compatibility with the callback style. * Upgrade node environment to Node.js 7.6.0+ * Bump package version * Preserve compatibility for callbacks * Cleanup * Re-add hello callback example * Make sure not returning won't blow everything up * Update stock example with request promise
10 lines
255 B
JavaScript
10 lines
255 B
JavaScript
module.exports = async function (context) {
|
|
console.log("headers=", JSON.stringify(context.request.headers));
|
|
console.log("body=", JSON.stringify(context.request.body));
|
|
|
|
return {
|
|
status: 200,
|
|
body: "Hello, world !\n"
|
|
};
|
|
}
|