{"id":29874001,"url":"https://github.com/xcfstudio/woodfish-server","last_synced_at":"2025-07-31T00:02:09.979Z","repository":{"id":304921573,"uuid":"582535283","full_name":"xcfstudio/woodfish-server","owner":"xcfstudio","description":"多用户电子木鱼系统，基于Koa2","archived":false,"fork":false,"pushed_at":"2025-07-16T03:19:51.000Z","size":172,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T05:58:50.853Z","etag":null,"topics":["koa","koa2","mysql","nodejs","redis","sequelize","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xcfstudio.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-12-27T06:12:43.000Z","updated_at":"2025-07-16T03:19:55.000Z","dependencies_parsed_at":"2025-07-17T11:00:02.612Z","dependency_job_id":null,"html_url":"https://github.com/xcfstudio/woodfish-server","commit_stats":null,"previous_names":["xcfstudio/woodfish-server"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xcfstudio/woodfish-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcfstudio%2Fwoodfish-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcfstudio%2Fwoodfish-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcfstudio%2Fwoodfish-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcfstudio%2Fwoodfish-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xcfstudio","download_url":"https://codeload.github.com/xcfstudio/woodfish-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xcfstudio%2Fwoodfish-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267961953,"owners_count":24172528,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["koa","koa2","mysql","nodejs","redis","sequelize","typescript"],"created_at":"2025-07-31T00:01:04.709Z","updated_at":"2025-07-31T00:02:09.961Z","avatar_url":"https://github.com/xcfstudio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 木鱼功德网 服务端 [KOA2][MySQL][Redis]\n\n[![zzCq7d.png](https://s1.ax1x.com/2022/12/27/zzCq7d.png)](https://imgse.com/i/zzCq7d)\n\n## 20250716更新\n今天上了下github看到这个项目，怎么也想不通我大学时候怎么会弄出这么无聊的项目，我也是无语了...\n\n## 关联前端项目\n+ GitLab: https://gitlab.com/xcfstudio/woodfish-app\n+ GitHub: https://github.com/xcfstudio/woodfish-app\n+ Gitee: https://gitee.com/xcfstudio/woodfish-app\n\n## 前言\n本项目是作者的创作型实验项目，旨在打造干净、清爽的小而美的应用。本项目主要功能是积分制敲木鱼，并进行排行，多用户在线敲木鱼功德系统， 基于Koa2开发。数据使用`MySQL`存储，`Redis`做缓存，提高性能。\n\n注: windows用户必须在`gitbash`中运行脚本, 不然会出错。如无法正常执行脚本, 请自行阅读脚本, 根据脚本内容手动操作。\n\n## 启动项目\n\n### 安装依赖\n```shell\n# npm\nnpm install\n\n# yarn\nyarn install\n```\n\n### 配置数据库\n\n1. 搭建redis、mysql环境:\n可通过docker搭建，也可直接安装\n2. 修改项目配置文件:\n   配置文件位于`项目根目录/config`, 修改`mySQL.ts`与`redis.ts`, 使其符合当前环境\n3. 创建数据库: 手动建立名称为`woodfish`的数据库。SQL语句示例: `CREATE SCHEMA 'woodfish' ;`\n\n### 调试项目\n**生成密钥:**\n\n执行脚本文件: \n```shell\nsh ./secretKey/genSecretKey.sh\n```\n或拷贝已有的密钥至此文件夹, 根据脚本内的文件名进行命名。\n\n\n**启动调试：**\n```shell\n  npm run dev\n```\n  开发模式, 基于`nodemon`,  文件发生改动自动重启服务。配置文件在`项目根目录/nodemon.json`\n\n**同步模型:**\n\n `GET`请求`/api/system/syncmodels`, 数秒后完成模型同步。此接口只能访问一次便锁定, 若需再次同步，需删除`项目根目录/tag/db.lock`\n\n### 编译\n```shell\nnpm run build\n```\n编译结果在`dist`目录中生成, 脚本会在编译结果中生成密钥, 如不需要可修改`项目根目录/build.sh`, 或自行替换编译结果中的密钥\n\n### 生产环境\n```shell\nnpm run production\n```\n注: 此命令需要编译后再运行\n\n使用`pm2`开多进程, web进程默认开6个, 定时任务开一个。\n\n项目内置了`pm2`, 但是建议全局安装一个`pm2`:\n```shell\nsudo npm i pm2 -g\n```\n\n**`pm2`常用指令：**\n[`pm2`官方文档](https://www.npmjs.com/package/pm2)\n\n## 关于作者\n\nEric Xie，前端开发者与工业设计师，擅长TS全栈开发、UI设计。个人网站：[https://xiecangfeng.com](https://xiecangfeng.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcfstudio%2Fwoodfish-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcfstudio%2Fwoodfish-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcfstudio%2Fwoodfish-server/lists"}