function fakeLatency(req, res, next) {
    if (req.url.match(/^\/json/)) {
        setTimeout(next, 3000);
    } else {
        next();
    }
}
Install:
     npm install browser-sync

Run:
     node <yourfile.js>

This example will create a server & use the `app` directory as the root
 - any requests beginning with /json will have fake latency applied
 - for 3 seconds