A lightweight Node.js server that generates a real-time GIF image. Perfect for embedding live data (crypto prices, server stats, or "now playing" info as dummy data) into places that don't support JavaScript, like GitHub Readmes or Emails.
Standard "Infinite GIFs" cause browsers to show a permanent loading spinner. This project uses the HTTP Refresh Header Hack to serve a single-frame GIF that tells the browser to re-request the image every second, ensuring smooth updates without the "loading" UI.
Because this project uses node-canvas, you must have the required build tools installed on your OS.
- For Ubuntu / Debian:
sudo apt-get update
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev- For macOS:
brew install pkg-config cairo pango jpeg giflib librsvg-
Clone the repo:
git clone https://github.com/sunanda35/Infinite-GIF.git cd Infinite-GIF -
Install dependencies:
npm install
-
Run the server:
npm start
-
View it: Open your browser to
http://localhost:3000/live-status.gif.