dereferrer
v1.0.2
Published
Get info about referrer page
Downloads
6
Readme
dereferrer
This module is just a tiny helper that loads HTML from referrer URL found in request.
Installation
npm install dereferrer
or:
npm install https://github.com/ahwayakchih/dereferrer
Usage
With Express/Connect:
app.use(require('dereferrer').createExpress());
app.use(function (req, res, next) {
console.log('Dereferred:', req.referrerURL, req.referrerHTML);
});
Standalone:
const dereferrer = require('dereferrer').getReferrerHTML;
dereferrer(req, function (err, referrerHTML, referrerURL) {
console.log('Dereferred:', referrerHTML, referrerURL);
});