Public
Express
Readme

Returning a tiny GIF from a val

Here's that GIF:

It's so small!

1
2
3
4
5
6
7
8
import { Buffer } from "node:buffer";
export let gifEndpoint = (req, res) => {
res.set("Content-Type", "image/gif");
res.send(
Buffer.from("R0lGODdhAQABAPAAAP8AAAAAACwAAAAAAQABAAACAkQBADs=", "base64"),
);
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
tmcw-gifendpoint.express.val.run
October 23, 2023