2.0.0 • Published 9 years ago

app-title v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

app-title

pic

This module will set the process.title to your application name (the one set in package.json).

Example

index.js (your app main file):

require('app-title')();

console.log('process.title === %s', process.title);
console.log('now open `top` and be amazed :)');

setInterval(function() {
  var sum = 0;

  for (var i = 0; i < 6000000; i++) {
    if (i % 2 === 0) {
      sum += i;
    }
  }
}, 1000);

package.json:

{
  "name": "app-title"
}

Run node index.js and then top.

pic

Protip: you can also pass in a custom title directly like in the example below:

require('app-title')('myApp:v2.0')

License

MIT