fn1 = function(req, res, next) {
    console.log(req.url);
    next();
}
Install:
     npm install browser-sync

Run:
     node <yourfile.js>

This example will create a proxy server and run middlewares