{"id":20994855,"url":"https://github.com/xiedacon/nodeclub-koa","last_synced_at":"2026-03-05T18:38:42.775Z","repository":{"id":20748772,"uuid":"86968616","full_name":"xiedacon/nodeclub-koa","owner":"xiedacon","description":"use koa to rewrite nodeclub","archived":false,"fork":false,"pushed_at":"2026-02-02T03:28:10.000Z","size":1641,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-02T14:39:15.299Z","etag":null,"topics":["koa","koa2"],"latest_commit_sha":null,"homepage":"https://github.com/cnodejs/nodeclub","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiedacon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-02T06:45:24.000Z","updated_at":"2026-02-02T03:28:14.000Z","dependencies_parsed_at":"2024-12-09T06:18:52.377Z","dependency_job_id":"fc243bc9-0eec-4369-a996-33d3076bea2a","html_url":"https://github.com/xiedacon/nodeclub-koa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xiedacon/nodeclub-koa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiedacon%2Fnodeclub-koa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiedacon%2Fnodeclub-koa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiedacon%2Fnodeclub-koa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiedacon%2Fnodeclub-koa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiedacon","download_url":"https://codeload.github.com/xiedacon/nodeclub-koa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiedacon%2Fnodeclub-koa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30143198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T16:58:46.102Z","status":"ssl_error","status_checked_at":"2026-03-05T16:58:45.706Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["koa","koa2"],"created_at":"2024-11-19T07:20:07.488Z","updated_at":"2026-03-05T18:38:42.737Z","avatar_url":"https://github.com/xiedacon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodeclub-koa\n\n[![Build Status](https://travis-ci.org/xiedacon/nodeclub-koa.svg?branch=master)](https://travis-ci.org/xiedacon/nodeclub-koa)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![codecov](https://codecov.io/gh/xiedacon/nodeclub-koa/branch/master/graph/badge.svg)](https://codecov.io/gh/xiedacon/nodeclub-koa)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/xiedacon/nodeclub-koa/blob/master/LICENSE)\n\n使用koa2重写的nodeclub\n\n### 使用\n\n```\n1. git clone https://github.com/xiedacon/nodeclub-koa.git\n2. cd nodeclub-koa\n3. npm install\n4. docker-compose up\n5. npm start\n6. visit http://localhost:3000\n7. done!\n```\n\n### 中间件\n\n##### 主要\n\n* koa\n* koa-bodyparser ==\u003e ctx.request.body\n* koa-session2 ==\u003e ctx.session\n* koa-router ==\u003e 路由\n* static中间件 ==\u003e 自己写的，主要是为了加载less解析，具有压缩功能\n* render中间件 ==\u003e ctx[.response].render，自己写的，只做了简单的模板引擎适配\n* 模板引擎 ==\u003e 由 [art-template 3.1](https://github.com/aui/art-template/tree/3.1.0) 修改而来，与 [主版本](https://github.com/aui/art-template) 语法相差太大，以后升级 [TODO](#TODO)\n* busboy ==\u003e ctx.busboy\n* bluebird ==\u003e global.Promise\n* log4js ==\u003e 全局logger\n* redis ==\u003e cache\n* mongoose ==\u003e db\n* config-lite ==\u003e 根据环境加载config\n* resolve-path ==\u003e static中间件依赖\n\n##### 功能性中间件\n\n* bcrypjs ==\u003e password加密\n* uuid ==\u003e accessToken\n* koa-csrf ==\u003e csrf攻击防范\n* koa-helmet ==\u003e header\n* koa-passport ==\u003e github第三方登录\n* passport-github\n\n##### 其它\n\n* validator\n* bytes\n* colors\n* moment\n* multiline ==\u003e 用于解决 ` 处理不了的文本\n* koa-mount\n* data2xml\n* xmlbuilder\n\n##### 测试\n\n* standard ==\u003e 代码格式\n* codecov ==\u003e 测试覆盖率\n* istanbul ==\u003e 测试覆盖率\n* mocha \n* power-assert\n* supertest\n* mm ==\u003e mock测试\n* rewire ==\u003e 私有方法测试\n\n### TODO\n\n* [ ] 升级为 [art-template@4](https://github.com/aui/art-template)\n* [x] 集成测试和测试覆盖率\n* [x] 重构\n* [ ] 尝试将busboy中间件改为Promise的形式\n* [ ] 尝试将controller跟schema合为一层，形成\n\n  ```\n  - controller\n    - topic.js\n    - topic.schema.js\n\n  或\n\n  - controller\n    - topic\n      - _id.js\n      - _id.schema.js\n  ```\n\n### 协议\n\n[MIT](https://github.com/xiedacon/nodeclub-koa/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiedacon%2Fnodeclub-koa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiedacon%2Fnodeclub-koa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiedacon%2Fnodeclub-koa/lists"}