Using WebStrom can easily debug the Node applcation.

For example, we have an Node+Express application.

server.js:

/**
* Created by Answer1215 on 12/9/2014.
*/
'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 an "Hello World" string.

What we want is to see how to use webstrom to debug this server.js and get "Hello World" string from the console.

It will show:

Then in the Tools bar, select RESTful Client:

Set the HTTP method, Host/port, and Path, then click run, you will 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.

/**
* Created by Answer1215 on 12/9/2014.
*/
'use strict'; var expres = require('express');
var app = expres(); app.get('/', function(request, response) {
response.send(200, "Hello world");
}); app.get('/people', function(request, response){ response.json(200, "People yled");
}); app.listen(3000);

After rerun the debug, In RESTful client, we get:

最新文章

  1. 安装完magento后,其他电脑无法访问magento,URL自动跳转到http://localhost/magento
  2. 常用的SQL 语句
  3. ASP.NET MVC 5 入门教程 (4) View和ViewBag
  4. 2.C#中通过委托Func消除重复代码
  5. Ajax 的缺点
  6. 《第一行代码--Android》阅读笔记之广播
  7. CSU1659: Graph Center(最短路)
  8. Delphi使用Windows API函数AnimateWindow实现窗体特效
  9. Java获取IP
  10. UIAlertController高级之嵌入其他控件 分类: ios技术 2015-02-02 11:58 96人阅读 评论(0) 收藏
  11. 用JMX远程监控Tomcat
  12. OpenCV 之 Mat 类
  13. Flume的各种类型的组件介绍
  14. js五道经典练习题--第四道qq好友列表
  15. Android-Kotlin-区间与for&List&Map简单使用
  16. 前端开发工具icestar
  17. 2018-2019-2 网络对抗技术 20165301 Exp4 恶意代码分析
  18. 网易的Spark技术实践
  19. Selenium简单测试页面加载速度的性能(Page loading performance)
  20. 用ladon框架封装Python为Webservice接口以及调用接口的方法

热门文章

  1. PHPSTORM 与 Xdebug 配合调试
  2. 数往知来 ADO.NET <八>
  3. Jcrop+strut2+jsp实现图片剪切
  4. 积累PDU
  5. (转载)OC学习篇之---归档和解挡
  6. 很棒的Sketch动画教程
  7. 性能测试-ApacheBench
  8. 一行 Python 实现并行化 -- 日常多线程操作的新思路
  9. Hadoop学习笔记1---简介 优点 架构分析
  10. 第二百三十四天 how can I 坚持