摘要:
个人总结:这篇文章主要讲解了Nodejs处理服务器乱码及编码的知识,读完这篇文章需要10分钟。 摘选自网络 写在前面 在web服务端开发中,字符的编解码几乎每天都要打交道。编解码一旦处理不当,就会出现令人头疼的乱码问题。 不少从事node服务端开发的同学,由于对字符编码码相关知识了解不足,遇到问题时 阅读全文
posted @ 2018-06-19 10:22
hh9515
阅读(236)
评论(0)
推荐(0)
摘要:
https://github.com/chyingp/nodejs-learning-guide 阅读全文
posted @ 2018-06-19 09:59
hh9515
阅读(245)
评论(0)
推荐(0)
摘要:
https://github.com/chyingp/nodejs-learning-guide 阅读全文
posted @ 2018-06-19 09:58
hh9515
阅读(120)
评论(0)
推荐(0)
摘要:
原文:https://github.com/chyingp/nodejs-learning-guide 自己过一遍: 模块简介 string_decoder模块用于将Buffer转成对应的字符串。使用者通过调用stringDecoder.write(buffer),可以获得buffer对应的字符串。 阅读全文
posted @ 2018-06-19 09:57
hh9515
阅读(639)
评论(0)
推荐(0)
摘要:
https://github.com/chyingp/nodejs-learning-guide 阅读全文
posted @ 2018-06-19 09:57
hh9515
阅读(174)
评论(0)
推荐(0)
摘要:
模块概览 nodejs的核心模块,基本上都是stream的的实例,比如process.stdout、http.clientRequest。 对于大部分的nodejs开发者来说,平常并不会直接用到stream模块,只需要了解stream的运行机制即可(非常重要)。 而对于想要实现自定义stream实例 阅读全文
posted @ 2018-06-19 09:43
hh9515
阅读(330)
评论(0)
推荐(0)
摘要:
debuglog(section) 很有用的调试方法。可以通过 util.debuglog(name) 来创建一个调试fn,这个fn的特点是,只有在运行程序时候,声明环境变量NODE_DEBUG=name,才会打印出调试信息。 可以看下面的例子,直接运行 node debuglog.js,没有任何输 阅读全文
posted @ 2018-06-19 09:33
hh9515
阅读(209)
评论(0)
推荐(0)
摘要:
https://github.com/chyingp/nodejs-learning-guide 阅读全文
posted @ 2018-06-19 09:23
hh9515
阅读(125)
评论(0)
推荐(0)
摘要:
模块概览 readline是个非常实用的模块。如名字所示,主要用来实现逐行读取,比如读取用户输入,或者读取文件内容。常见使用场景有下面几种,本文会逐一举例说明。 文件逐行读取:比如说进行日志分析。 自动完成:比如输入npm,自动提示"help init install"。 命令行工具:比如npm i 阅读全文
posted @ 2018-06-19 09:22
hh9515
阅读(2034)
评论(0)
推荐(0)

浙公网安备 33010602011771号