SHARE
TWEET

Untitled

a guest Jun 19th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top