emptygif
Language: English

All languages and frameworks

Node.js one-liner JavaScript

A JavaScript snippet for Node.js one-liner that answers requests for /pixel.gif with the empty GIF, decoded once at startup.

Node.js one-liner JavaScript

File
pixel.sh
node -e "require('node:fs').writeFileSync('pixel.gif', Buffer.from('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', 'base64'))"

We ran this snippet and compared the bytes it returned.

Official site: Node.js one-liner

More in JavaScript