Skip to content

Instantly share code, notes, and snippets.

@WaleedAshraf
Last active April 20, 2018 20:58
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 WaleedAshraf/43d53c5a027f4088367b6aa6b92b5da9 to your computer and use it in GitHub Desktop.
Save WaleedAshraf/43d53c5a027f4088367b6aa6b92b5da9 to your computer and use it in GitHub Desktop.
Building you first Serverless app in Node.js with AWS Lambda + S3 + API Gateway
exports.handler = async (event) => {
return sendRes(200,'Hello');
};
const sendRes = (status, body) => {
var response = {
statusCode: status,
headers: {
"Content-Type": "text/html"
},
body: body
};
return response;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment