Skip to content

Instantly share code, notes, and snippets.

@dhavaln
Created June 8, 2019 15:13
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 dhavaln/f49c967de1bf3892081ab0d3c86e047a to your computer and use it in GitHub Desktop.
Save dhavaln/f49c967de1bf3892081ab0d3c86e047a to your computer and use it in GitHub Desktop.
Serverless Hello World Layer Dependency
'use strict';
const
moment = require('moment');
module.exports.helloWorld = (event, context, callback) => {
const response = {
statusCode: 200,
headers: {
'Access-Control-Allow-Origin': '*', // Required for CORS support to work
},
body: JSON.stringify({
message: `Today is ${moment().format('DD/MMM/YYYY')}`
}),
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment