Skip to content

alessioalex/app-title

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Node module that will setup the process.title for your application automagically

Resources

Stars

Watchers

Forks

Packages

No packages published