Pokemon GIF Endpoint

node v14.20.1
version: 1.0.0
endpointsharetweet
const { getSprite } = require('pokemon-images'); const toPokemonGif = URL => getSprite((URL.match(/\?(.*)/) || [, "pikachu"])[1]); exports.endpoint = (request, response) => response .setHeader("content-type", "text/html; charset=UTF-8") .end(`<img src = "${toPokemonGif(request.url)}">`);
Loading…

no comments

    sign in to comment