Node.js turorial 1 : Node.js install on windows
Node.js tutorial 2 - Visual studio community 2015 for Node.js
If you already install the Node.js tools for visual studio, you can see the following templates when you select "new project" in visual studio.
I usually select "Blank Node.js Web application" template for node.js project.
If you are creating the project, let's run the template application. Template application is the web server which display "hello world" in the page.
If you want to change the browser, change it and clink play button (Red box in following picture)
Wow. it's your first Node.js web server!!!
Let's do it more. learn how to use breakpoint and tracepoint. those are the reason I use visual studio for Node.js.
Use breakpoint
Add breakpoint at lien 5. clink right mouse button at line 5 and choose "Insert Breakpoint".
and then, run this application. you can see the process is stopped at line 5 and there's no message in the chrome browser because it's stopped just before print out the "Hello world message". If you are using variables in your application you can watch the variables at this time. If you click "Continue" button twice, you can see the "Hello World" message in Chrome. (It runs twice, that's why we should clink twice)
Use Tracepoint
To see what's the tracepoint, let's try to set tracepoint at line 5. you can write the message which is printed out in output message windows when this line is running.I set "print "Hello world"" in this test. you can add some variables and functions.
you can see the following messages in output windows.
Those two functions, breakpoint and trancepoint are the reason why I use visual studio for Node.js and other javascript language.
Great Article
ReplyDeleteNode.js Project Topics for Computer Science
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai