Skip to content

sshahzaiib/no-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No console in Production

Disable all consoles in the production environments

Installation


Using yarn

yarn add @sshahzaiib/no-console

Using npm

npm i @sshahzaiib/no-console

Usage


Note: You need to set "NODE_DEBUG" environment variable to true when running node server in prod mode to see logs.

const noConsole = require('@sshahzaiib/no-console);
or
import noConsole from '@sshahzaiib/no-console';

... 

noConsole(); // no console logs after this state in production if NODE_DEBUG is not set to true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published