{"id":14989525,"url":"https://github.com/wunci/koa2-blog","last_synced_at":"2025-04-12T17:44:57.439Z","repository":{"id":53705887,"uuid":"96842771","full_name":"wunci/Koa2-blog","owner":"wunci","description":"node+koa2+mysql","archived":false,"fork":false,"pushed_at":"2023-01-28T08:39:44.000Z","size":2363,"stargazers_count":897,"open_issues_count":2,"forks_count":237,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-03T19:16:26.838Z","etag":null,"topics":["es6","koa2","koa2-blog","mysql","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/wunci.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}},"created_at":"2017-07-11T02:41:18.000Z","updated_at":"2024-09-20T06:06:37.000Z","dependencies_parsed_at":"2023-02-15T15:16:07.924Z","dependency_job_id":null,"html_url":"https://github.com/wunci/Koa2-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FKoa2-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FKoa2-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FKoa2-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wunci%2FKoa2-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wunci","download_url":"https://codeload.github.com/wunci/Koa2-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609501,"owners_count":21132915,"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","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":["es6","koa2","koa2-blog","mysql","nodejs"],"created_at":"2024-09-24T14:18:30.161Z","updated_at":"2025-04-12T17:44:57.406Z","avatar_url":"https://github.com/wunci.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koa2-blog\nnode+koa2+mysql\n\n\u003e 现在最新的代码有变动，请参照最新的代码，新增了上传头像、分页、markdown语法等\n\n\n教程 [Node+Koa2+Mysql 搭建简易博客]\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/wunci/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwunci%2Fkoa2-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwunci%2Fkoa2-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwunci%2Fkoa2-blog/lists"}