Skip to content

Instantly share code, notes, and snippets.

@furlanf
Last active November 17, 2019 16:05
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 furlanf/62fd575149633e29a382a4aba68409e0 to your computer and use it in GitHub Desktop.
Save furlanf/62fd575149633e29a382a4aba68409e0 to your computer and use it in GitHub Desktop.
const middy = require('/opt/middy-wrapper');
const products = require('/opt/data/vegetable-products.json');
// common-layer/data/vegetable-products.json
const handler = async (event, context) => {
try {
return {
'statusCode': 200,
'body': JSON.stringify({
products
})
}
} catch (err) {
console.log(err);
return err;
}
};
exports.handler = middy(handler);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment