1.0.0 • Published 3 years ago

transparent-pixel v1.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

transparent-pixel npm.io npm.io

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);
});
1.0.0

3 years ago