Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the title of a Windows console while npm is running?

I have started to develop a web application project on my Windows machine, for which I use npm, bower, and the nodejs HTTP server.

For easier start of the HTTP server, I created the batch file:

@echo off
title HTTP Server
npm start

npm start starts the http-server. For that I have the following entry in the packages.json:

"start": "http-server -a localhost -p 8000 -c-1"

But when I double click the batch, the title of the opening console window first changes to npm and then to bower. So it ignores my own title while npm/bower is running.

Since I have many console windows open, I would like to force the HTTP server console window to have my specific title. How can I achieve that?

like image 277
Desty Avatar asked Jun 03 '15 05:06

Desty


1 Answers

Set the title in your packages.json file:

"start": "title HTTP Server && http-server -a localhost -p 8000 -c-1"
like image 50
KlwntSingh Avatar answered Oct 15 '22 23:10

KlwntSingh