Remove all console.log before deploying nodejs app to production?

0
658

The best approach may be to wrap console.log in your app and only display “logs” if environment is “development”.

Another way, if you are in a hurry is to add this to the top of your server.js or similar (after the require statements):

console.log = function(){};

LEAVE A REPLY

Please enter your comment!
Please enter your name here