Nonlinear Performance Magnification
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

transparent-pixel

1.0.0 • Public • Published

transparent-pixel

One transparent pixel

Serve a transparent pixel with express.js:

const express = require('express');
const pixel = require('transparent-pixel');
 
const app = express();
 
app.get('/pixel/:metric', (request, response) => {
    report(request.params.metric); // your own logic
 
    response
        .status(201)
        .type('gif')
        .send(pixel);
});

Keywords

none

Install

npm i transparent-pixel

DownloadsWeekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

1.32 kB

Total Files

3

Last publish

Collaborators

  • avatar