很想问问各位,大家用node写web应用是不是也得随时重启测试啊???

16 views
Skip to first unread message

郁也风

unread,
Mar 20, 2012, 10:58:25 AM3/20/12
to Cnodejs
作为一个脚本语言,写程序愣是有了写java的感觉(java还有rebel来热部署呢),随时得重启来测试功能

这也太傻了点了吧。我现在写了个开头已经有点受不了了,很有点换到py来搞的冲动:(

Zoom.Quiet

unread,
Mar 20, 2012, 11:06:19 AM3/20/12
to cno...@googlegroups.com
在 2012年3月20日 下午10:58,郁也风 <som...@gmail.com> 写道:
> 作为一个脚本语言,写程序愣是有了写java的感觉(java还有rebel来热部署呢),随时得重启来测试功能
> 这也太傻了点了吧。我现在写了个开头已经有点受不了了,很有点换到py来搞的冲动:(

- 嗯嗯嗯?!
- 超多工具,支持 reload 的,,,
- 俺使用 coffeescript 进行 node 开发,嗯嗯嗯,本身就有调试模式来运行的,,

--
人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
俺: http://about.me/zoom.quiet
文字协议: http://creativecommons.org/licenses/by-sa/2.5/cn/

Yuan Feng

unread,
Mar 20, 2012, 11:52:40 AM3/20/12
to cno...@googlegroups.com
很多类似的开发辅助工具啊,node-dev试过没?

Sent from my iPhone

前山

unread,
Mar 20, 2012, 12:08:49 PM3/20/12
to cno...@googlegroups.com
还好吧,还能接受

Yi Tan

unread,
Mar 20, 2012, 12:17:00 PM3/20/12
to cno...@googlegroups.com

npm install forever

郁也风

unread,
Mar 20, 2012, 12:45:13 PM3/20/12
to cno...@googlegroups.com
你们说的这些是不是一直在后面刷新重启node的?

我之前用过俩,后来发现压根没法查看输出信息

2012/3/21 Yi Tan <yi2...@gmail.com>

孙光胜

unread,
Mar 20, 2012, 1:00:55 PM3/20/12
to cno...@googlegroups.com
npm install supervisor

supervisor app.js

可以监控某个目录或者文件的变更,如果有变更就重启app.js

郁也风

unread,
Mar 20, 2012, 1:20:03 PM3/20/12
to cno...@googlegroups.com
supervisor 我用过,命令行窗口闪的都不行了

2012/3/21 孙光胜 <sgs...@gmail.com>
supervisor

孙光胜

unread,
Mar 20, 2012, 1:29:41 PM3/20/12
to cno...@googlegroups.com
错误太多了?

郁也风

unread,
Mar 20, 2012, 1:36:15 PM3/20/12
to cno...@googlegroups.com
呵呵,不是,其实丫们可以提供个开发环境选项,这样在开发环境下reqire的cache不起作用就可以了,不知为啥丫们不搞。

开发环境又不需要关注性能

2012/3/21 孙光胜 <sgs...@gmail.com>

related searches:

Edit
Loading ...

related searches:

Edit
Loading ...

Yi Tan

unread,
Mar 20, 2012, 1:54:24 PM3/20/12
to cno...@googlegroups.com

terminal 1
{your command} > log

terminal 2
tail -f log

you'd better teach yourself some linux basic

郁也风

unread,
Mar 20, 2012, 2:12:49 PM3/20/12
to cno...@googlegroups.com
呃,现在用的windows环境,虽然我也有linux机器和mac

另外,你这个命令并没有达到不用重启node的目的啊

2012/3/21 Yi Tan <yi2...@gmail.com>

孙光胜

unread,
Mar 20, 2012, 2:19:11 PM3/20/12
to cno...@googlegroups.com
node app.js 2>errlog

Tomas Huang (冠)

unread,
Mar 20, 2012, 3:25:20 PM3/20/12
to cno...@googlegroups.com
只要不频繁这个问题是可以接受的,如果你总是需要启动服务来调试。说明了一些其他问题,比如说你的代码不是由单元测试来保证的(如果你总能写出正确的代码这没有关系), 比如说你习惯了依赖调试而在写代码的时候思路不严密。在比如说你对与javascript的运用不是特别纯属等等。。。
--
Name: Tomas Huang(黄冠)
Nick: 青山老妖
Position: WEIMA SOFTWARE DESIGN CO.SHA Co-founder
Email: huanggua...@gmail.com
Sina Micro Bloghttp://t.sina.com.cn/showpower(青山老妖_黄冠)
Twitter: runawaygo
------
互联网创业者,理想主义者,敏捷实践,HTML5,Node.js软件工程师,非专业产品设计师

Fei Zheng

unread,
Mar 20, 2012, 3:26:33 PM3/20/12
to cno...@googlegroups.com

这么晚还有人没睡。。。
2012/3/20 Tomas Huang (冠) <huanggua...@gmail.com>

Yuan Feng

unread,
Mar 21, 2012, 11:37:07 AM3/21/12
to cno...@googlegroups.com
顶这个

Sent from my iPhone

郁也风

unread,
Mar 21, 2012, 11:49:54 AM3/21/12
to cno...@googlegroups.com
确实,我一般很少写单元测试的,有的功能很简单还去写单元测试我觉得纯属浪费时间啊

2012/3/21 Yuan Feng <fen...@gmail.com>
Reply all
Reply to author
Forward
0 new messages