Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
module.exports = function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
This function simply returns messages as a JSON in response to any request
Definitely not what you would want to have in a production environment, but will suffice for the demo
Note the content-type header for 'application/json'
context.res = {
// status: 200, /* Defaults to 200 */
body: {"messages": [
headers: {
'Content-Type': 'application/json'

This comment has been minimized.

Copy link
Owner Author

@imalchenko imalchenko commented Aug 9, 2017

Sample function for an Azure Function App. Used for this demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment