Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the node js process name on windows 10?

I have a node js process running on windows 10. I want to change the name of the process so that i can get some performance details. I tried changing the process.title property of the process object but, it does not reflect in the power shell. I can find only node as the process name. Is there any other way to change the process name in windows.

like image 946
Arunkumar Kathirvel Avatar asked Jun 26 '17 09:06

Arunkumar Kathirvel


2 Answers

Change name on OS level 1. Rename your node binary to foobar 2. Change package.json start script from node start.js to foobar start.js

Change name from JavaScript code

You can't change process name from JavaScript code. Node.js is libuv + V8. JavaScript read and run after process already created.

like image 189
galkin Avatar answered Sep 17 '22 15:09

galkin


In node.js, you can get/set process.title

In the browsers, you can get/set document.title

Hope that helps

like image 39
AliFurkan Avatar answered Sep 16 '22 15:09

AliFurkan