{"id":14989532,"url":"https://github.com/fxy5869571/blog-react","last_synced_at":"2025-04-06T10:12:18.641Z","repository":{"id":36448853,"uuid":"133649883","full_name":"fxy5869571/blog-react","owner":"fxy5869571","description":"基于typescript koa2 react的个人博客","archived":false,"fork":false,"pushed_at":"2022-12-08T18:54:06.000Z","size":2663,"stargazers_count":325,"open_issues_count":30,"forks_count":67,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T08:11:25.291Z","etag":null,"topics":["antd","blog","koa2","react","redux","redux-saga","typescript"],"latest_commit_sha":null,"homepage":"https://fxy5869571.github.io","language":"TypeScript","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/fxy5869571.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":"2018-05-16T10:32:09.000Z","updated_at":"2025-03-19T10:06:45.000Z","dependencies_parsed_at":"2023-01-17T01:46:10.142Z","dependency_job_id":null,"html_url":"https://github.com/fxy5869571/blog-react","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/fxy5869571%2Fblog-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxy5869571%2Fblog-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxy5869571%2Fblog-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fxy5869571%2Fblog-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fxy5869571","download_url":"https://codeload.github.com/fxy5869571/blog-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464222,"owners_count":20942970,"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":["antd","blog","koa2","react","redux","redux-saga","typescript"],"created_at":"2024-09-24T14:18:31.078Z","updated_at":"2025-04-06T10:12:18.621Z","avatar_url":"https://github.com/fxy5869571.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Apple的个人博客  \u003cimg src=\"https://img.shields.io/badge/link-996.icu-red.svg\"  heigth=\"5%\"/\u003e\n\n### 动机\n一直想学习下typescript的，趁着业余时间，于是就写了这个博客0.0\n### 技术栈\n前后端都基于typescript3.0，使用tslint规范代码\n\n后端使用 koa2 提供一个简易的 http 服务器, 并将所有路由定位到入口 router/index.ts 处理. 使用 react-router分发接口, 后端 API 采用类似 Restful 风格的接口, 数据库是 MongoDB, , 权限控制采用 jwt token 的方式.目前只有两种权限，游客只有浏览的权限，管理员可以增删改查文章\n\n博客和管理端基于 react 框架, 使用 redux 和 redux-saga 统一处理数据, react-router 提供路由, ui 使用antd, 使用fetch请求后端数据.\n深圳求个react坑\n\n### 演示地址\n__[Apple的个人博客](http://fxyblog.com/)__\n\n__[Apple的个人博客管理端](http://fxyblog.com/admin)__\n\n### 更新\n\n1.更新typescript 到3.0。\n\n2.解决服务器接口本地跨域的问题。\n3.修改了文章只有第一段代码高亮的bug\n\n## Usage\n\n### 安装\n```\ngit clone https://github.com/fxy5869571/blog-react.git\n\ncd blog-react\n\nyarn install\n\nyarn start\n```\n### 入口\n```\nimport { LocaleProvider } from 'antd'\nimport zhCN from 'antd/lib/locale-provider/zh_CN'\nimport * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport { Provider } from 'react-redux'\nimport { applyMiddleware, createStore } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport './index.less'\nimport reducer from './reducers'\nimport RouterMap from './router/RouterMap'\nimport rootSaga from './saga'\n\nconst sagaMiddleware = createSagaMiddleware()\nconst store = createStore(reducer, applyMiddleware(sagaMiddleware))\nsagaMiddleware.run(rootSaga)\nReactDOM.render(\n  \u003cLocaleProvider locale={zhCN}\u003e\n    \u003cProvider store={store}\u003e\n      \u003cRouterMap /\u003e\n    \u003c/Provider\u003e\n  \u003c/LocaleProvider\u003e,\n  document.getElementById('root') as HTMLElement\n)\n```\n### 目录结构\n\u003cimg src=\"http://img.qqzi.com/Content/Upload/2018/08/02/5f2045ec-633b-4f2c-b4a7-ac06b877af0a.png\"  heigth=\"5%\"/\u003e\n\n### 管理端截图\n\u003cimg src=\"http://img.qqzi.com/Content/Upload/2018/08/02/96505143-cd22-4701-8723-d745cc9ff601.png\"  heigth=\"5%\"/\u003e\n\n### 博客截图\n\u003cimg src=\"http://img.qqzi.com/Content/Upload/2018/08/02/abc1ed51-16e3-410a-bad9-058310e3f553.png\"  heigth=\"5%\"/\u003e\n\n### 请我喝杯咖啡\n \u003cimg src=\"http://img.qqzi.com/Content/Upload/2019/05/30/fba890ff-57e1-4f99-9589-da23ffb16ab0.jpeg\" height = \"200\" alt=\"图片名称\" align=center /\u003e\n  \u003cimg src=\"http://img.qqzi.com/Content/Upload/2019/05/30/b233949a-01c0-43b6-9136-fa55c3694435.jpeg\" height = \"200\" alt=\"图片名称\" align=center /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxy5869571%2Fblog-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffxy5869571%2Fblog-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffxy5869571%2Fblog-react/lists"}