# egg-24time
微信小程序社区功能全栈解决方案,配合以下项目使用:
> [egg-24time](https://github.com/seasonstar/egg-24time)
后端使用Egg,Mysql,Redis,基于Nodejs开发,全套代码使用ES6编写
> [weapp-24time](https://github.com/seasonstar/weapp-24time)
微信小程序端
> [egg-weapp-sdk](https://github.com/seasonstar/egg-weapp-sdk)
egg的微信小程序的用户会话管理插件,客户端需配合腾讯云出品的[qcloud-weapp-client-sdk](https://github.com/tencentyun/weapp-client-sdk)使用,Redis保存会话信息
--------------------
本示例包含:
1. 微信小程序登录示例
2. 进行带会话的网络请求示例
2. 基于腾讯云COS上传图片或文件的示例
3. 发送帖子,点赞,举报,删除帖子示例
## QuickStart
### Development
```shell
git clone https://github.com/seasonstar/egg-24time.git
cd egg-24time
```
Config Redis and Mysql on [config/config.default.js](config/config.default.js)
```javascript
config.redis = {
client: {
host: '127.0.0.1',
port: '6379',
password: '',
db: '0',
},
};
config.sequelize = {
dialect: 'mysql', // support: mysql, mariadb, postgres, mssql
database: 'tftime',
host: 'localhost',
port: '3306',
username: 'root',
password: '',
};
config.weappSDK = {
appId: '', // your weapp appId
appSecret: '', // weapp appSecret
};
// Qcloud Cloud Object Storage
config.cos = {
secretId: '',
secretKey: '',
appId: '',
bucket: '',
folder: '',
};
```
Import test data into Mysql
```shell
mysql -u root -p < db.sql
```
```shell
$ npm install
$ npm run dev
$ open http://localhost:7001/
```
### Deploy
Use `EGG_SERVER_ENV=prod` to enable prod mode
```shell
$ EGG_SERVER_ENV=prod npm start
```
or `EGG_SERVER_ENV=prod nohup node index.js > stdout.log 2> stderr.log &` run quietly
### npm scripts
- Use `npm run autod` to auto detect dependencies upgrade
- Use `npm run lint` to check code style
- Use `npm test` to run unit test
## Credits && Inspiration
[cos-auth](https://github.com/tencentyun/cos-auth)
[wafer-node-server-sdk](https://github.com/tencentyun/wafer-node-server-sdk)
## LICENSE
[MIT](LICENSE)
Please Open Issues if you have troubles.
没有合适的资源?快使用搜索试试~ 我知道了~
微信小程序社区全栈解决方案.zip
共43个文件
js:27个
tpl:5个
yml:1个
需积分: 3 0 下载量 128 浏览量
2024-01-15
10:14:59
上传
评论
收藏 62KB ZIP 举报
温馨提示
方案是为解决特定问题或达成特定目标而制定的一系列计划或步骤。它的作用是提供一种系统性的方法,以有效地应对挑战、优化流程或实现目标。以下是方案的主要作用: 问题解决: 方案的核心目标是解决问题。通过系统性的规划和执行,方案能够分析问题的根本原因,提供可行的解决方案,并引导实施过程,确保问题得到合理解决。 目标达成: 方案通常与明确的目标相关联,它提供了一种达成这些目标的计划。无论是企业战略、项目管理还是个人发展,方案的制定都有助于明确目标并提供达成目标的路径。 资源优化: 方案在设计时考虑了可用资源,以最大化其效用。通过明智的资源分配,方案可以在有限的资源条件下实现最大的效益,提高效率并减少浪费。 风险管理: 方案通常会对潜在的风险进行评估,并制定相应的风险管理策略。这有助于减轻潜在问题的影响,提高方案的可行性和可持续性。 决策支持: 方案提供了决策者所需的信息和数据,以便做出明智的决策。这种数据驱动的方法有助于减少不确定性,提高决策的准确性。 团队协作: 复杂的问题通常需要多个人的协同努力。方案提供了一个共同的框架,帮助团队成员理解各自的职责和任务,促进协作并确保整个团队朝着共同的目标努力。 监控与评估: 方案通常包括监控和评估的机制,以确保实施的有效性。通过定期的评估,可以及时调整方案,以适应变化的环境或新的挑战。 总体而言,方案的作用在于提供一种有序、有计划的方法,以解决问题、实现目标,并在实施过程中最大化资源利用和风险管理。
资源推荐
资源详情
资源评论
收起资源包目录
A Twitter-like news and social server for Egg. 微信小程序社区全栈解决方案.zip (43个子文件)
SJT-code
.eslintrc 199B
.autod.conf.js 326B
.travis.yml 162B
app
controller
comment.js 2KB
weapp.js 2KB
post.js 5KB
school.js 1KB
home.js 3KB
utils
pinyin.js 72KB
middleware
error_handler.js 471B
public
css
news.css 3KB
favicon.png 3KB
service
user.js 2KB
post.js 716B
view
news
item.tpl 529B
user.tpl 788B
list.tpl 451B
detail.tpl 747B
layout
layout.tpl 865B
model
user.js 2KB
post_feedback.js 593B
userprofile.js 531B
social_oauth.js 738B
post_like.js 322B
post_image.js 337B
post.js 1KB
school.js 645B
post_comment.js 793B
extend
filter.js 173B
router.js 818B
LICENSE 1KB
package.json 1KB
.vimrc 32B
test
app
controller
news.test.js 1KB
service
HackerNews.test.js 658B
index.js 121B
.gitignore 96B
.eslintignore 23B
README.md 2KB
db.sql 16KB
config
config.default.js 1KB
plugin.js 457B
config.prod.js 199B
共 43 条
- 1
资源评论
JJJ69
- 粉丝: 6029
- 资源: 5613
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功