Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. 'use strict';
  2. const
  3. moment = require('moment');
  4.  
  5. module.exports.helloWorld = (event, context, callback) => {
  6. const response = {
  7. statusCode: 200,
  8. headers: {
  9. 'Access-Control-Allow-Origin': '*', // Required for CORS support to work
  10. },
  11. body: JSON.stringify({
  12. message: `Today is ${moment().format('DD/MMM/YYYY')}`
  13. }),
  14. };
  15.  
  16. callback(null, response);
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement