{"id":13834983,"url":"https://github.com/waylau/nodejs-book-samples","last_synced_at":"2025-08-10T23:34:40.678Z","repository":{"id":38659796,"uuid":"183009362","full_name":"waylau/nodejs-book-samples","owner":"waylau","description":"Node.js Samples. （Node.js 案例大全）《Node.js企业级应用开发实战》源码","archived":false,"fork":false,"pushed_at":"2024-12-08T14:35:25.000Z","size":1290,"stargazers_count":110,"open_issues_count":54,"forks_count":51,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-25T01:09:07.524Z","etag":null,"topics":["angular","node","nodejs"],"latest_commit_sha":null,"homepage":"https://waylau.com/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waylau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-23T12:23:48.000Z","updated_at":"2025-05-10T18:04:00.000Z","dependencies_parsed_at":"2024-12-22T10:11:23.216Z","dependency_job_id":"b62e38b0-47b4-4043-843f-216d01f87dac","html_url":"https://github.com/waylau/nodejs-book-samples","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/waylau/nodejs-book-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waylau%2Fnodejs-book-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waylau%2Fnodejs-book-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waylau%2Fnodejs-book-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waylau%2Fnodejs-book-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waylau","download_url":"https://codeload.github.com/waylau/nodejs-book-samples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waylau%2Fnodejs-book-samples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269806056,"owners_count":24478110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","node","nodejs"],"created_at":"2024-08-04T14:00:54.556Z","updated_at":"2025-08-10T23:34:40.650Z","avatar_url":"https://github.com/waylau.png","language":null,"readme":"# Node.js Samples. （Node.js 案例大全）《Node.js企业级应用开发实战》《循序渐进Node.js企业级开发实践》源码\n\n* [hello-world](samples/hello-world)：第一个Node.js应用\n* [hello-world-typescript](samples/hello-world-typescript)：创建TypeScript版本的Node.js应用\n* [module-system](samples/module-system)：模块化系统\n* [deep-strict-equal](samples/deep-strict-equal/)：deepStrictEqual示例\n* [buffer-demo/character-encodings.js](samples/buffer-demo/character-encodings.js)：指定字符编码\n* [buffer-demo/buffer-slice.js](samples/buffer-demo/buffer-slice.js)：切分缓冲区\n* [buffer-demo/buffer-concat.js](samples/buffer-demo/buffer-concat.js)：连接缓冲区\n* [buffer-demo/buffer-compare.js](samples/buffer-demo/buffer-compare.js)：比较缓冲区\n* [buffer-demo/buffer-read.js](samples/buffer-demo/buffer-read.js)：缓冲区解码\n* [buffer-demo/buffer-write.js](samples/buffer-demo/buffer-write.js)：缓冲区编码\n* [events-demo/parameter-this.js](samples/events-demo/parameter-this.js)：监听事件\n* [events-demo/parameter-lambda.js](samples/events-demo/parameter-lambda.js)：lambda方式监听事件\n* [events-demo/set-immediate.js](samples/events-demo/set-immediate.js)：异步模式监听事件\n* [events-demo/emitter-once.js](samples/events-demo/emitter-once.js)：仅处理事件一次\n* [events-demo/error-event.js](samples/events-demo/error-event.js)：为error事件注册监听器\n* [events-demo/event-names.js](samples/events-demo/event-names.js)：获取已注册的事件的名称\n* [events-demo/event-listeners.js](samples/events-demo/event-listeners.js)：获取监听器数组的副本\n* [events-demo/prepend-listener.js](samples/events-demo/prepend-listener.js)：将事件监听器添加到监听器数组的开头\n* [events-demo/remove-listener.js](samples/events-demo/remove-listener.js)：移除监听器\n* [fs-demo/fs-open.js](samples/fs-demo/fs-open.js)：打开文件\n* [fs-demo/fs-read.js](samples/fs-demo/fs-read.js)：读取文件\n* [fs-demo/fs-read-dir.js](samples/fs-demo/fs-read-dir.js)：读取目录\n* [fs-demo/fs-read-file.js](samples/fs-demo/fs-read-file.js)：读取文件的全部内容\n* [fs-demo/fs-write.js](samples/fs-demo/fs-write.js)：写入文件\n* [fs-demo/fs-write-string.js](samples/fs-demo/fs-write-string.js)：将字符串写入文件\n* [fs-demo/fs-write-file.js](samples/fs-demo/fs-write-file.js)：将数据写入文件\n* [child-process/spawn-command.js](samples/child-process/spawn-command.js)：使用spawn\n* [child-process/exec-command.js](samples/child-process/exec-command.js)：使用exec\n* [child-process/exec-file.js](samples/child-process/exec-file.js)：使用execFile\n* [stream-demo/stream-readable-event.js](samples/stream-demo/stream-readable-event.js)：readable事件\n* [stream-demo/stream-pause.js](samples/stream-demo/stream-pause.js)：流停止触发data事件\n* [stream-demo/stream-pipe.js](samples/stream-demo/stream-pipe.js)：绑定可写流到可读流\n* [stream-demo/stream-read.js](samples/stream-demo/stream-read.js)：从内部缓冲拉取并返回数据\n* [stream-demo/stream-unpipe.js](samples/stream-demo/stream-unpipe.js)：解除绑定\n* [stream-demo/stream-async-iterator.js](samples/stream-demo/stream-async-iterator.js)：异步迭代器\n* [stream-demo/stream-finish.js](samples/stream-demo/stream-finish.js)：finish事件\n* [net-demo/create-server.js](samples/net-demo/create-server.js)：创建TCP服务器\n* [net-demo/socket-write.js](samples/net-demo/socket-write.js)：TCP服务器的例子\n* [net-demo/server-close.js](samples/net-demo/server-close.js)：关闭TCP服务器\n* [dgram-demo/create-socket.js](samples/dgram-demo/create-socket.js)：创建UDP服务器\n* [dgram-demo/socket-close.js](samples/dgram-demo/socket-close.js)：关闭UDP服务器\n* [dgram-demo/upd-server.js](samples/dgram-demo/upd-server.js)：UDP服务器\n* [dgram-demo/upd-client.js](samples/dgram-demo/upd-client.js)：UDP客户端\n* [http-demo/hello-world.js](samples/http-demo/hello-world.js)：第一个HTTP服务器\n* [http-demo/rest-service.js](samples/http-demo/rest-service.js)：构建REST服务的例子\n* [ws-demo](samples/ws-demo)：WebSocket聊天服务器的例子\n* [tls-demo/tls-server.js](samples/tls-demo/tls-server.js)：构建TLS服务器\n* [tls-demo/tls-client.js](samples/tls-demo/tls-client.js)：构建TLS客户端\n* [express-demo](samples/express-demo)：Express示例\n* [express-rest](samples/express-rest)：Express REST 示例\n* [socket-io-demo](samples/socket-io-demo)：Socket.IO示例\n* [angular-demo](samples/angular-demo)：Angular应用的例子\n* [vue-demo](samples/vue-demo)：Vue.js应用的例子\n* [mysql-demo](samples/mysql-demo)：操作MySQL的例子\n* [mongodb-demo](samples/mongodb-demo)：操作MongoDB的例子\n* [redis-demo](samples/redis-demo)：操作Redis的例子\n* [user-management](samples/user-management)：内存版的“用户管理”客户端\n* [user-management-rest](samples/user-management-rest)：“用户管理”服务端\n* [user-management-ui](samples/user-management-ui)：与服务端对应的“用户管理”客户端\n* [websocket-chat](samples/uwebsocket-chat)：基于WebSocket即时聊天应用\n\n\n\n## 配套书籍\n\n如果你喜欢本开源书，也欢迎支持下该书的正式出版物，实体店及各大网店有售。\n\n* [《Node.js企业级应用开发实战》](https://github.com/waylau/nodejs-book-samples)（北京大学出版社）\n  * [京东](https://search.jd.com/Search?keyword=%E6%9F%B3%E4%BC%9F%E5%8D%AB%20Node.js%E4%BC%81%E4%B8%9A%E7%BA%A7%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98\u0026enc=utf-8\u0026wq=%E6%9F%B3%E4%BC%9F%E5%8D%AB%20Node.js%E4%BC%81%E4%B8%9A%E7%BA%A7%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91%E5%AE%9E%E6%88%98\u0026pvid=cef388426fa443baac6fb59a1a133421)\n  * [当当](http://search.dangdang.com/?key=%C1%F8%CE%B0%CE%C0%20Node.js%C6%F3%D2%B5%BC%B6%D3%A6%D3%C3%BF%AA%B7%A2%CA%B5%D5%BD\u0026act=input)\n* [《循序渐进Node.js企业级开发实践》](https://waylau.com/about-progressive-nodejs-enterprise-level-application-practice-book/)（清华大学出版社）\n  * [京东](https://re.jd.com/search?keyword=%E5%BE%AA%E5%BA%8F%E6%B8%90%E8%BF%9BNode.js%E4%BC%81%E4%B8%9A%E7%BA%A7%E5%BC%80%E5%8F%91%E5%AE%9E%E8%B7%B5\u0026enc=utf-8)\n  * [当当](https://search.dangdang.com/?key=%D1%AD%D0%F2%BD%A5%BD%F8Node.js%C6%F3%D2%B5%BC%B6%BF%AA%B7%A2%CA%B5%BC%F9\u0026act=input)\n\n\n\n\n\n\n## 联系作者:\n\n\n本书如有勘误，会在\u003chttps://github.com/waylau/nodejs-book-samples/issues\u003e上进行发布。由于笔者能力有限，时间仓促，难免错漏，欢迎读者批评指正。\n\n您也可以直接联系我：\n\n* 博客：https://waylau.com\n* 邮箱：[waylau521(at)gmail.com](mailto:waylau521@gmail.com)\n* 微博：http://weibo.com/waylau521\n* 开源：https://github.com/waylau\n\n\n## 其他书籍\n\n若您对本书不感冒，笔者还写了其他方面的超过一打的书籍（可见\u003chttps://waylau.com/books/\u003e），多是开源电子书。\n\n本人也维护了一个[books-collection](https://github.com/waylau/books-collection)项目，里面提供了优质的专门给程序员的开源、免费图书集合。\n\n二手书集市（\u003chttps://github.com/waylau/second-hand-books\u003e），提供优质二手书交易。\n\n## 开源捐赠\n\n\n![开源捐赠](https://waylau.com/images/showmethemoney-sm.jpg)\n\n捐赠所得所有款项将用于开源事业！","funding_links":[],"categories":["目录"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaylau%2Fnodejs-book-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaylau%2Fnodejs-book-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaylau%2Fnodejs-book-samples/lists"}