{"id":14989552,"url":"https://github.com/aemoe/fairy","last_synced_at":"2025-04-12T00:31:39.216Z","repository":{"id":163048651,"uuid":"83891305","full_name":"aemoe/fairy","owner":"aemoe","description":"一个能够支持前后端分离并支持中间层同构的完整框架","archived":false,"fork":false,"pushed_at":"2017-05-18T02:01:37.000Z","size":9732,"stargazers_count":130,"open_issues_count":0,"forks_count":24,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-25T20:33:34.634Z","etag":null,"topics":["koa-router","koa2","react","react-router","webpack"],"latest_commit_sha":null,"homepage":"http://aemoe.listenlite.com/2017/05/18/How%20to%20build/","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/aemoe.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":"2017-03-04T12:19:40.000Z","updated_at":"2025-03-22T09:33:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"10199bc1-8be1-42b9-92d6-94696a07dabe","html_url":"https://github.com/aemoe/fairy","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"97a471e4b01918926f2315b1e262edce56326659"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aemoe%2Ffairy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aemoe%2Ffairy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aemoe%2Ffairy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aemoe%2Ffairy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aemoe","download_url":"https://codeload.github.com/aemoe/fairy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501276,"owners_count":21114641,"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":["koa-router","koa2","react","react-router","webpack"],"created_at":"2024-09-24T14:18:33.301Z","updated_at":"2025-04-12T00:31:37.731Z","avatar_url":"https://github.com/aemoe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/aemoe/fairy\"\u003e\n    \u003cimg width=\"100\" heigth=\"100\" src=\"doc/img/logo.png\"\u003e\n  \u003c/a\u003e\n  \u003ch2\u003eFairy - 一个前后端分离框架 \u003c/h2\u003e\n  \u003cp align=\"left\"\u003e\n  一个能够支持前后端分离并支持中间层同构的完整框架,或许现在它还不够完善,但是我会把构建该框架中遇到的问题都列出来,以方便其他人遇到问题不在需要去到处搜索问题,希望为自己搭建框架的人有一些帮助,文档也会不断更新和优化,你可以watch项目随时看到文档的更新,也希望最后成为一个完整而又完美的框架,如果这些问题对你有帮助,请点个star吧,感谢~ ~\n  \u003cp\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003e怎么安装\u003c/h2\u003e\n\n开启本地数据库Mysql,并使用phpmyadmin类似的工具在mysql中创建数据库(名字随意之后要填写),之后将mysql中的文件夹sql文件导入数据库, 最后在server/config/db.json中配置mysql的数据库名称和用户名密码即可\n\n在./clent/中执行, 客户端开发,默认端口5000\n\n```bash\nnpm i\nnpm start\n```\n\n在根目录,客户端开发及部署,默认开启端口3000\n\n```bash\nnpm i pm2 -g\nnpm i\nnpm start\n```\n\n\n\u003ch2 align=\"center\"\u003e框架优势\u003c/h2\u003e\n\n* 路由同步(前后端共用一套路由)\n* 模板同步(前后端共用一套模板)\n* 数据同步(前后端公用一套数据状态机)\n\n同构对比之前非同构加载对比, 可以明显看到白屏时间更少, 页面总计加载速度更快\n\n非同构 VS 同构\n\n\u003cimg width=\"390\" src=\"doc/img/vs.png\"\u003e\n\n前端开发中也支持react,react-router,样式及Redux的动态更新\n\n\u003cimg width=\"450\" src=\"doc/img/preview.gif\"\u003e\n\n\u003ch2 align=\"center\"\u003e开发BUG日记\u003c/h2\u003e\n当开发中遇到的问题,我会列在下面,以方便自己查询和其他人进行相同问题的修改和修复\n\n[问题列表](https://github.com/aemoe/fairy/issues)\n\n\u003ch2 align=\"center\"\u003e如何搭建这样一个框架\u003c/h2\u003e\n\n[Link](https://aemoe.github.io/2017/05/18/How%20to%20build/)\n\n\u003ch2 align=\"center\"\u003e协议\u003c/h2\u003e\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faemoe%2Ffairy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faemoe%2Ffairy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faemoe%2Ffairy/lists"}