{"id":20698617,"url":"https://github.com/mangotsing/koa2-mysql","last_synced_at":"2026-01-31T06:02:57.251Z","repository":{"id":115987947,"uuid":"124404744","full_name":"MangoTsing/koa2-mysql","owner":"MangoTsing","description":"根据教程 [Node+Koa2+Mysql 搭建简易博客]改写简易blog","archived":false,"fork":false,"pushed_at":"2018-05-13T12:56:45.000Z","size":197,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-14T14:45:08.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/MangoTsing.png","metadata":{"files":{"readme":"README(wclimb-Koa2-blog).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":"2018-03-08T14:42:23.000Z","updated_at":"2020-12-02T14:18:48.000Z","dependencies_parsed_at":"2023-03-30T03:35:09.275Z","dependency_job_id":null,"html_url":"https://github.com/MangoTsing/koa2-mysql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MangoTsing/koa2-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MangoTsing%2Fkoa2-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MangoTsing%2Fkoa2-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MangoTsing%2Fkoa2-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MangoTsing%2Fkoa2-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MangoTsing","download_url":"https://codeload.github.com/MangoTsing/koa2-mysql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MangoTsing%2Fkoa2-mysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"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":[],"created_at":"2024-11-17T00:26:00.986Z","updated_at":"2026-01-31T06:02:57.223Z","avatar_url":"https://github.com/MangoTsing.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koa2-blog\nnode+koa2+mysql (欢迎star)\n\n\u003e 现在最新的代码有变动，请参照最新的代码，新增了上传头像、分页、markdown语法等\n\n教程 [Node+Koa2+Mysql 搭建简易博客](http://www.wclimb.site/2017/07/12/Node-Koa2-Mysql-%E6%90%AD%E5%BB%BA%E7%AE%80%E6%98%93%E5%8D%9A%E5%AE%A2/) \n\n### 创建数据库 \n\n登录数据库\n```\n$ mysql -u root -p\n```\n创建数据库\n```\n$ create database nodesql;\n```\n使用创建的数据库\n```\n$ use nodesql;\n```\n\n\u003e database: nodesql  tables: users posts comment  (已经在lib/mysql建表)\n\n\n| users   | posts    |  comment  |\n| :----: | :----:   | :----: |\n|   id    |   id    |   id    |\n|   name    |   name    |   name    |\n|   pass    |   title    |   content    |\n|   avator     | content      |   moment    |\n|    moment     | md      |    postid   |\n|     -    | uid      |   avator    |\n|     -    | moment      |    -   |\n|     -   | comments      |    -   |      \n|     -   | pv             |   -   |      \n|     -   |  avator       |    -   |    \n\n\n* id主键递增\n* name: 用户名\n* pass：密码\n* avator：头像\n* title：文章标题\n* content：文章内容和评论\n* md：markdown语法\n* uid：发表文章的用户id \n* moment：创建时间\n* comments：文章评论数\n* pv：文章浏览数\n* postid：文章id\n\n```\n$ git clone https://github.com/wclimb/Koa2-blog.git\n```\n```\n$ cd Koa2-blog\n```\n```\n$ cnpm i supervisor -g\n```\n```\n$ cnpm i \n```\n```\n$ npm run dev(运行项目)\n```\n```\n$ npm test(测试项目)\n```\n### 演示\n\n![](http://oswpupqu5.bkt.clouddn.com/blog1.gif)\n\n### 注册\n\n![](http://oswpupqu5.bkt.clouddn.com/signup1.png)\n\n### 登陆\n\n![](http://oswpupqu5.bkt.clouddn.com/signin1.png)\n\n### 发表文章\n\n![](http://oswpupqu5.bkt.clouddn.com/create1.png)\n\n### 文章详情\n\n![](http://oswpupqu5.bkt.clouddn.com/postcontent1.png)\n\n### 文章列表\n\n![](http://oswpupqu5.bkt.clouddn.com/posts1.png)\n\n### 个人文章页以及正常编辑删除文章和评论\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmangotsing%2Fkoa2-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmangotsing%2Fkoa2-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmangotsing%2Fkoa2-mysql/lists"}