diff --git a/netlify/functions/story-image-axis-svg.js b/netlify/functions/story-image-axis-svg.js new file mode 100644 index 0000000..3ff5027 --- /dev/null +++ b/netlify/functions/story-image-axis-svg.js @@ -0,0 +1,60 @@ +exports.handler = async function(event, context) { + const { + //path, // Path parameter + //httpMethod, // Incoming request’s method name + // headers, // {Incoming request headers} + queryStringParameters, // {query string parameters } + // body, // A JSON string of the request payload + // isBase64Encoded, // A boolean flag to indicate if the applicable request payload is Base64-encode + } = event + + // console.log('queryStringParameters', queryStringParameters) + + const { + width = 200, + height = 100, + heading = 'Does It ARM' + } = queryStringParameters + + return { + statusCode: 200, + headers: { + 'Content-Type': 'image/svg+xml', + }, + body: /* html */` + + + + + + + + + + + + + + + + + + + + + + +
${ heading }
+
+
+ ` + } +}