# eggjs-wechat **Repository Path**: huiyani/eggjs-wechat ## Basic Information - **Project Name**: eggjs-wechat - **Description**: eggjs聊天应用后端 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 5 - **Created**: 2020-09-05 - **Last Updated**: 2024-04-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # eggjs-wechat #### 介绍 eggjs聊天应用后端 #### 软件架构 软件架构说明 #### 安装教程 1. 安装pm2(node环境),安装redis 2. 执行 npm install 3. 安装数据库迁移工具 npm install --save-dev sequelize-cli 4. 修改配置信息: config/config.default.js sequelize配置 oss配置 database/config.json 数据库相关信息 5. 执行迁移命令 npx sequelize db:migrate 6. npm start 7. 添加反向代理 添加配置: ``` #PROXY-START/ location ~* \.(php|jsp|cgi|asp|aspx)$ { proxy_pass http://localhost:7001; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; } location / { proxy_pass http://localhost:7001; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; add_header X-Cache $upstream_cache_status; #Set Nginx Cache add_header Cache-Control no-cache; expires 12h; } location /ws { proxy_pass http://127.0.0.1:7001; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Real-IP $remote_addr; } #PROXY-END/ ``` #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)