Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 757 Bytes

README.md

File metadata and controls

48 lines (32 loc) · 757 Bytes

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