NODEJS COMMAND Shorthands

Official NODEJS COMMAND Shorthands. I found these when taking a look at the utils source code. Lovin the -gangsta one haha! exports . shorthands =    { s : [ "–loglevel" , "silent" ]    , d : [ "–loglevel" , "info" ]    , dd : [ "–loglevel" , "verbose" ]    , ddd …

Mocha Test Silence Log Output

When testing my server I have log output which I don’t want to appear when I run my tests using Mocha. I want to Silence Log Output!!! Ofcourse a solution is suggested by TJ! Let’s take a look… OK, so include this in your server.js file. // api middleware if (process.env.NODE_ENV !== ‘test’) {   …

NodeJS Tips: .nodemonignore example & usage

Nodemon is a noce.js a grunt extension package which monitor for any changes in your node.js application and automatically restart the server – perfect for development. By default, if nodemon will only restart when a .js JavaScript file changes. In some cases you will want to ignore some specific files, directories or file patterns, to …