Using Webstrom can easily debug the Node applcation.
For example, we had an node+express application.
Server.js:
/**/' use strict '; var expres = require (' Express '); var app = expres (); App.get (function(request, Response) { response.send (200 , "Hello World"); App.listen (3000);
All it does just send back a "Hello world" string.
What we want are to see how to use Webstrom to debug this server.js and get ' Hello world ' string from the console.
It'll show:
Then in the Tools bar, select RESTful Client:
Set the HTTP method, Host/port, and Path, then click Run, you'll get "Hello world".
Notice that, if you modify the Server.js, you should rerun the debug to get the lastest modification.
For example:we add a people path.
/**/' use strict '; var expres = require (' Express '); var app = expres (); App.get (function(request, Response) { response.send (200 , "Hello World"); App.get (function(request, Response) { Response.json (+, "people yled");}); App.listen (3000);
After rerun the debug, in RESTful client, we get:
[Express + Webstrom] Debug node. js RESTful Application