Skip to content

Instantly share code, notes, and snippets.

@htr3n
Created October 19, 2021 05:31
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 htr3n/8286069ce09828a57f6ef9b7e35ae218 to your computer and use it in GitHub Desktop.
Save htr3n/8286069ce09828a57f6ef9b7e35ae218 to your computer and use it in GitHub Desktop.
'use strict';
exports.handler = async (event, context, callback) => {
const result = {
body: null,
isBase64Encoded: false,
statusCode: 200
};
console.log('Received a render request event');
try {
// result.body = // call another function using Node Canvas;
} catch (error) {
console.log(error);
result.statusCode = 500;
result.body = JSON.stringify(error);
return callback(result);
}
return callback(null, result);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment