{"id":13487692,"url":"https://github.com/fomenyesu/egg-restapi-module-tool","last_synced_at":"2025-03-27T23:31:25.666Z","repository":{"id":94483076,"uuid":"96503217","full_name":"fomenyesu/egg-restapi-module-tool","owner":"fomenyesu","description":"a example of eggjs, react, antd, dva, webpack, mysql, restful api and other stuff made it work...","archived":false,"fork":false,"pushed_at":"2019-01-05T14:57:21.000Z","size":1417,"stargazers_count":339,"open_issues_count":0,"forks_count":58,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-30T23:35:29.913Z","etag":null,"topics":["dva","egg","egg-rest","egg-restapi","egg-restapi-module-tool","react"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/fomenyesu.png","metadata":{"files":{"readme":"README.cn.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}},"created_at":"2017-07-07T05:44:21.000Z","updated_at":"2024-08-15T06:02:19.000Z","dependencies_parsed_at":"2023-07-15T01:01:34.789Z","dependency_job_id":null,"html_url":"https://github.com/fomenyesu/egg-restapi-module-tool","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomenyesu%2Fegg-restapi-module-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomenyesu%2Fegg-restapi-module-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomenyesu%2Fegg-restapi-module-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fomenyesu%2Fegg-restapi-module-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fomenyesu","download_url":"https://codeload.github.com/fomenyesu/egg-restapi-module-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944050,"owners_count":20697944,"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":["dva","egg","egg-rest","egg-restapi","egg-restapi-module-tool","react"],"created_at":"2024-07-31T18:01:02.253Z","updated_at":"2025-03-27T23:31:25.222Z","avatar_url":"https://github.com/fomenyesu.png","language":"CSS","funding_links":[],"categories":["Applications","应用"],"sub_categories":["插件"],"readme":"# Egg Restful Api Module Tool\n\n一个使用 eggjs2.0, react, antd, dva2.0, webpack, mysql 通过模块管理配置模块表跟表结构来生成对应的restful api的实例。\n\n系统主要包括两个功能：\n\n1 模块管理 对模块表进行管理，实现模块表的CRUD操作\n\n2 接口管理 提供接口说明，已经接口调试器方便进行接口调试。\n\n## 更新日志:\n\n#### 2017-07-10  初始化\n\n#### 2017-07-17  发布版本 [egg-restapi-module-tool v0.9 Released](https://github.com/fomenyesu/egg-restapi-module-tool/releases/tag/v0.9) \n\n#### 2017-12-01  更新登录组件，加入oauth2.0登录\n#### 2018-01-03  更新 dva 到 dva2.0\n#### 2018-01-04  更新 egg 到 egg2.0\n\n# Examples for [egg](https://github.com/eggjs/egg/)\n\n1 前端使用react+Antd+Dva实现页面功能\n\n2 后端使用eggjs+mysql实现\n\n3 使用npm run dev进行开发\n\n4 npm run build 直接进行构建\n\n5 可作egg项目的简单的boilerplate使用\n\n\n## 开发\n\n#### 安装\n\ninstall mysql\nstart mysql\nimport testdb.sql to mysql\n\n```\nnpm i egg-bin --save-dev\nnpm install\n```\n#### 使用说明\n\nrun npm to start server\n\n```\nnpm run dev\n```\n\n前端开发地址：  http://localhost:8080\n后端开发地址：  http://localhost:7001\n\n也可以使用：\n\nnpm run dev_static 开发前端react+antd的页面\n\nnpm run server 开发后端服务器的逻辑\n\nnpm run dev 同时开发前后端的业务\n\n\n\n## Distribute\n\n```bash\n$ npm run build\n$ npm run pro\n```\n\nnpm run build 构建前端代码，前端代码会自动复制到后端目录里面\n\nnpm run pro 在服务器启动egg服务，部署上线\n\n访问地址： \nhttp://serverIP:7001\n\n## REST API Example\n\napi/restql/users GET List\n\n```javascript\n{\n\"meta\":{\"total\":3},\n\"data\":[\n{\"_id\":\"58d8a899f5f2486f1f6d4236\",\"uid\":1,\"name\":\"admin\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\"},\n{\"_id\":\"58db7828a14b14815447cf33\",\"name\":\"sdf\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\",\"uid\":3,\"__v\":0},\n{\"_id\":\"58db7d3bcee4d48df6f5bdfd\",\"name\":\"sdddf\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\",\"uid\":4,\"__v\":0}\n]\n}\n```\n\napi/restql/users/1 GET Single Data\n\n```javascript\n{\n\"meta\":{\"total\":1},\n\"data\":[\n{\"_id\":\"58d8a899f5f2486f1f6d4236\",\"uid\":1,\"name\":\"admin\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\"}\n]\n}\n```\n\napi/restql/users/2 PUT Update data with uid\n\n```javascript\n{\"name\":\"admin123\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\"}\n```\n\napi/restql/users POST insert data\n\n```javascript\n{\"name\":\"admin123\",\"pass\":\"123\",\"status\":1,\"time\":\"1325472736\"}\n```\n\napi/restql/users/2 DELETE Delete data with uid\n\n```javascript\n{message:\"success\"}\n```\n\n其他新增的模块都会自动生成这5种restful API请求接口。\n\n# 截屏\n![login.png](https://raw.githubusercontent.com/fomenyesu/egg-restapi-module-tool/master/static/assets/modulerest.png)\n![page1.png](https://raw.githubusercontent.com/fomenyesu/egg-restapi-module-tool/master/static/assets/modulerest1.png)\n![page2.png](https://raw.githubusercontent.com/fomenyesu/egg-restapi-module-tool/master/static/assets/modulerest2.png)\n![page3.png](https://raw.githubusercontent.com/fomenyesu/egg-restapi-module-tool/master/static/assets/modulerest3.png)\n\n# 感谢\n[egg](https://github.com/eggjs/egg/)\n[antd-admin](https://github.com/zuiidea/antd-admin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffomenyesu%2Fegg-restapi-module-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffomenyesu%2Fegg-restapi-module-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffomenyesu%2Fegg-restapi-module-tool/lists"}