Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created May 18, 2022 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardgrantserverless/7a72021172b0ae138dac4ed440818c96 to your computer and use it in GitHub Desktop.
Save richardgrantserverless/7a72021172b0ae138dac4ed440818c96 to your computer and use it in GitHub Desktop.
// handler.js
module.exports.helloWorld = (event, context, callback) => {
var hWorld = new HelloWorld();
const response = {
statusCode: 200,
headers: {
'Access-Control-Allow-Origin': '*', // Required for CORS support to work
},
body: JSON.stringify(hWorld.sayHello(event)),
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment