<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nodejs on 蛇索尼 Aiden</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/</link><description>Recent content in Nodejs on 蛇索尼 Aiden</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>shesl-meow@qq.com (佘崧林)</managingEditor><webMaster>shesl-meow@qq.com (佘崧林)</webMaster><lastBuildDate>Tue, 15 Jun 2021 10:21:42 +0800</lastBuildDate><atom:link href="https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/index.xml" rel="self" type="application/rss+xml"/><item><title>Commonjs vs ES Modules</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/nodemodules/</link><pubDate>Tue, 15 Jun 2021 10:21:42 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/nodemodules/</guid><description>参考： https://www.zhihu.com/question/62791509 https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1 What’s CJS? What’s ESM? 在 Node 模块的早期，所有的 Node Module 都是用 Common.js 编写的。我们可以从 named export 与 default export 两种方式简单地了解它的使用规则： named exp</description></item><item><title>函数与类</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/10.%E5%87%BD%E6%95%B0%E4%B8%8E%E7%B1%BB/</link><pubDate>Thu, 03 Dec 2020 22:19:41 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/10.%E5%87%BD%E6%95%B0%E4%B8%8E%E7%B1%BB/</guid><description>prototype 简单地说，JavaScript 是基于原型的语言。 当我们调用一个对象的属性时，如果对象没有该属性，JavaScript 解释器就会从对象的原型</description></item><item><title>Buffer</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/7.buffer/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/7.buffer/</guid><description>参考： https://www.runoob.com/nodejs/nodejs-buffer.html 概述 JavaScript 语言自身只有字符串数据类型，没有二进制数据类型。因此在 Node.js 中，定义了一个 Buffer 类，该类用来创建一个专门存放二进制数据的缓存区。一个 Buffer</description></item><item><title>EventEmitter</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/6.eventemitter/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/6.eventemitter/</guid><description>参考： https://www.runoob.com/nodejs/nodejs-event.html Node.js 所有的异步 I/O 操作在完成时都会发送一个事件到事件队列。 Node.js 里面的许多对象都会分发事件：一个 net.Server 对象会在每次有新连接时触发一个事件， 一个 fs.readStream</description></item><item><title>Node.js REPL</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/3.repl/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/3.repl/</guid><description>介绍 Node.js REPL (Read Eval Print Loop: 交互式解释器) 表示一个电脑的环境，类似 Window 系统的终端或 Unix/Linux shell，我们可以在终端中输入命令，并接收系统的响应。 Node 自带了交互式</description></item><item><title>NPM</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/2.npm%E4%BB%8B%E7%BB%8D/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/2.npm%E4%BB%8B%E7%BB%8D/</guid><description>参考： https://www.runoob.com/nodejs/nodejs-npm.html 介绍 NPM 是随同 node.js 一起安装的包管理工具，能解决 node.js 代码部署上的很多问题。 常见的使用场景有以下几种： 允许用户从 NPM 服务器下载，别人编写的第三方</description></item><item><title>Stream</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/8.stream/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/8.stream/</guid><description>概述 Stream 是一个抽象接口，Node 中有很多对象实现了这个接口。例如，对 http 服务器发起请求的 request 对象就是一个 Stream，还有 stdout（标准输出）</description></item><item><title>第一个程序</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/1.%E7%AE%80%E5%8D%95%E7%9A%84%E4%BE%8B%E5%AD%90/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/1.%E7%AE%80%E5%8D%95%E7%9A%84%E4%BE%8B%E5%AD%90/</guid><description>参考： https://www.runoob.com/nodejs/nodejs-http-server.html HelloWorld 在 Mac 上直接使用下面的命令即可安装： 1 brew install node HelloWorld 程序，可以检测安装状态： 1 console.log(&amp;#34;Hello World&amp;#34;); 简单的 WEB 服务器 在我们创建 Node.js 第一个 &amp;ldquo;Hello, World!&amp;rdquo; 应用前，让我们先了解</description></item><item><title>回调函数</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/4.%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/4.%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0/</guid><description>介绍 Node.js 异步编程的直接体现就是回调。 异步编程依托于回调来实现，但不能说使用了回调后程序就异步化了。 回调函数在完成任务后就会被调用，Node 使用</description></item><item><title>模块系统</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/9.%E6%A8%A1%E5%9D%97%E7%B3%BB%E7%BB%9F/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/9.%E6%A8%A1%E5%9D%97%E7%B3%BB%E7%BB%9F/</guid><description>概述 为了让 Node.js 的文件可以相互调用，Node.js 提供了一个简单的模块系统。 模块是 Node.js 应用程序的基本组成部分，文件和模块是一一对应的。换言之，一个</description></item><item><title>事件循环</title><link>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/5.%E4%BA%8B%E4%BB%B6%E5%BE%AA%E7%8E%AF/</link><pubDate>Sun, 16 Feb 2020 21:16:00 +0800</pubDate><author>shesl-meow@qq.com (佘崧林)</author><guid>https://blog.haitai-social.com/note/%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8E%A5%E5%8F%A3/nodejs/5.%E4%BA%8B%E4%BB%B6%E5%BE%AA%E7%8E%AF/</guid><description>参考： https://www.runoob.com/nodejs/nodejs-event-loop.html https://zhuanlan.zhihu.com/p/37427130 简介 Node.js 是单进程单线程应用程序，那么它是如何实现异步调用的呢？ 它维护了六个 FIFO 队列，分别表示不同的功能的函数： 1 2 3 4 5 6 7 8 9 10 11 12</description></item></channel></rss>