I am currently experimenting with a function that is supposed to only display a message in the console without redirecting the actual URL of my server when a file is changed.
watcher.add("/home/diegonode/Desktop/ExpressCart-master/routes/2.mk");
watcher.on('change', function (info) {
console.log(info);
router.get('*',function(req,res){
res.redirect('http://www.google.com'+req.url)
})
});
Can someone please assist me with this?