🔀 Merge pull request #4 from Ecalose/master
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
## 在 Heroku 上的搭建步骤
|
||||
在此之前,请先读一下“在自己的服务器上的部署步骤”这一节。
|
||||
由于 Heroku 的限制,当 30 分钟内没有请求的话就会被冻结,之后再次启动时数据就丢了,因此这里我们采用配置环境变量的方式进行配置。
|
||||
|
||||
### 手动部署
|
||||
1. Fork 本项目。
|
||||
2. 在[此处](https://dashboard.heroku.com/new-app)新建一个 Heroku APP,名字随意,之后可以设置自己的域名。
|
||||
3. 在 Deployment method 处,选择 Connect to Github,输入 message-pusher 搜索本项目,之后点击 Connect,之后启用自动部署(Enable Automatic Deploys)。
|
||||
@@ -64,6 +64,9 @@
|
||||
|SMTP_PASS|smtp 服务器用户凭据|
|
||||
|HREF|服务的 href,如 https://wechat-message.herokuapp.com/ ,注意后面要有 /|
|
||||
|
||||
### 一键部署
|
||||
[](https://heroku.com/deploy?template=https://github.com/Ecalose/message-pusher)
|
||||
|
||||
## 发送消息的方式
|
||||
1. 发送纯文本消息:直接 HTTP GET 请求 `https://你的域名/前缀/消息`,缺点是有字数限制,且只能是纯文本,这是微信模板消息的限制。
|
||||
2. 发送 Markdown 消息,调用方式分为两种:
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "message-pusher",
|
||||
"description": "消息推送服务",
|
||||
"env": {
|
||||
"MODE": {
|
||||
"description": "Heroku 模式",
|
||||
"value": "1"
|
||||
},
|
||||
"WECHAT_APP_ID": {
|
||||
"description": "你的测试号的 APP ID",
|
||||
"value": ""
|
||||
},
|
||||
"WECHAT_APP_SECRET": {
|
||||
"description": "你的测试号的 APP Secret",
|
||||
"value": ""
|
||||
},
|
||||
"WECHAT_TEMPLATE_ID": {
|
||||
"description": "你的测试号的模板消息的 ID",
|
||||
"value": ""
|
||||
},
|
||||
"WECHAT_OPEN_ID": {
|
||||
"description": "你的 Open ID",
|
||||
"value": ""
|
||||
},
|
||||
"WECHAT_VERIFY_TOKEN": {
|
||||
"description": "你自己设置的验证 token",
|
||||
"value": ""
|
||||
},
|
||||
"EMAIL": {
|
||||
"description": "你的默认目标邮箱",
|
||||
"value": ""
|
||||
},
|
||||
"PREFIX": {
|
||||
"description": "你的前缀,如 admin",
|
||||
"value": ""
|
||||
},
|
||||
"SMTP_SERVER": {
|
||||
"description": "smtp 服务器地址,如 smtp.qq.com",
|
||||
"value": ""
|
||||
},
|
||||
"SMTP_USER": {
|
||||
"description": "smtp 服务器用户邮箱",
|
||||
"value": ""
|
||||
},
|
||||
"SMTP_PASS": {
|
||||
"description": "你自己设置的验证 token",
|
||||
"value": ""
|
||||
},
|
||||
"WECHAT_VERIFY_TOKEN": {
|
||||
"description": "smtp 服务器用户凭据",
|
||||
"value": ""
|
||||
},
|
||||
"HREF": {
|
||||
"description": "服务的 href,如 https://wechat-message.herokuapp.com/ ,注意后面要有 /",
|
||||
"value": ""
|
||||
}
|
||||
},
|
||||
"website": "https://github.com/Ecalose/message-pusher",
|
||||
"repository": "https://github.com/Ecalose/message-pusher"
|
||||
}
|
||||
Reference in New Issue
Block a user