blankgif

0.1.0 • Public • Published

blankgif

For serving 1x1px transparent gif image with nodejs.

Setup

$ npm install --save blankgif

Usage

var blankgif = require('blankgif');
var express = require('express');
 
// option 1
app.get('/track.gif', blankgif.sendBlankGif);
 
// option 2
app.use(blankgif.middleware())
app.get('/track.gif', function(req, res) {
 
  process.nextTick(function() { /* do tracking stuff */ });
 
  res.set('Cache-Control', 'public, max-age=0');
  res.status(200).sendBlankGif();
});

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i blankgif

      Weekly Downloads

      44

      Version

      0.1.0

      License

      MIT

      Last publish

      Collaborators

      • xpepermint