- Javascript fundamentals 7- hours
- Udacity Javascript Basics
- NodeSchool.io - Javascripting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Request, Response } from "express"; | |
import { createCanvas } from "canvas"; | |
import GifEncoder from "gifencoder"; | |
export async function generateImage(label: string): Promise<Buffer> { | |
const width = 955; | |
const height = 500; | |
const canvas = createCanvas(width, height); | |
const ctx = canvas.getContext("2d"); |