Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use nodemon in NTVS(Node Tools for Visual Studio)

I was working with Node on Visual Studio Professional 13, and I soon realized that restarting my server for every change in code was becoming a hassle.

So I did some research and discovered that most people used the nodemon to automatically refresh their server. Although the tutorials online used command line to install and run their server with nodemon when I used VS's interface to generate my express project and download nodemon.

My problem is that when I run my server, the server doesnt restart when I update my code. My question is how can run my server through nodemon if I am coding my project using VS

this link also shows people with the same question as me, but the solution in it isn't that clear https://nodejstools.codeplex.com/workitem/545

like image 858
AmitS Avatar asked Aug 08 '14 18:08

AmitS


1 Answers

the following works for me:

  • open your Project Properties ("PROJECT" > "YourApp Properties...")

  • point the "Node.exe path" to nodemon.cmd (click on the button right of the input field, enter "%AppData%\npm\" in the adress bar, show all files, select "nodemon.cmd", save the properties form)

start debugger, or use "start without debugging" (Ctrl+F5)

like image 137
indus Avatar answered Oct 19 '22 05:10

indus