index.js
1function generateImage() {2const canvas = document.createElement('canvas');3const ctx = canvas.getContext('2d');45// Set canvas dimensions6canvas.width = 800;7canvas.height = 600;89// Draw background10ctx.fillStyle = '#1e1e1e';11ctx.fillRect(0, 0, canvas.width, canvas.height);1213return canvas.toDataURL();14}