2.0.0 • Published 5 years ago

no-console v2.0.0

Weekly downloads
16
License
ISC
Repository
-
Last release
5 years ago

No console log

Remove console.log() in production Environment.

  $ npm install no-console      

Usage

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

Example:

    require('dotenv').config();

    const express = require('express');

    const noc = require('no-console')  // require package

    console.log('I will print');

    const app = express();

    noc();  // after this no log will be printed in prod mode if  NODE_DEBUG is not set

    console.log('I will not print in production mode');

    app.listen(process.env.PORT || 3000, ()=>{
        console.log("server is running");
    });
2.0.0

5 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago