Created
June 8, 2019 15:13
-
-
Save dhavaln/f49c967de1bf3892081ab0d3c86e047a to your computer and use it in GitHub Desktop.
Serverless Hello World Layer Dependency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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