GithubHelp home page GithubHelp logo

wanghongice / mp-push-nestjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brucx/mp-push-nestjs

0.0 0.0 0.0 1.12 MB

微信公众号消息推送服务,类似“server酱”,提供Docker镜像部署

License: MIT License

TypeScript 97.87% Dockerfile 2.13%

mp-push-nestjs's Introduction

MP-PUSH

一个频道可以被多个微信订阅,一个微信也可以订阅多个频道。当有消息到达频道时,会向所有订阅的微信推送通知。

开发此项目的目的是实现一个自己的“Server酱”,方便自定义。

零痛苦部署,极度简单的API,代码开源,自由扩展。

准备好服务号或者测试号

如果注册不了服务号也一点关系没有,测试号完全可以满足个人使用的需求。打开这里进行注册。

先配置一个消息模板,需要带一个 first 字段。

准备好一个可以通过域名访问或者有公网IP的服务器

推荐使用 Ubuntu 系统

apt update
apt upgrade

准备部署

安装 Docker 环境

apt install docker.io

然后执行以下指令

$ sudo docker run -d \
-e WX_APP_ID="wxc124e540d18*****" \
-e WX_APP_SC="dcd143ad7e000de32c0236**********" \
-e WX_TEMPLATE_ID="bzrWGCKcwMNPuerpK4WrsbMJ_kq0I4CWxyM207sy8Uk" \
-p 80:3000 \
-v mppushdb:"/app/data" \
brucex/mp-push-nestjs

确认接口配置信息

测试号管理页面确认接口配置信息。

URL 为 http://域名或IP/wx

Token 随意不校验

测试接口

关注测试号,发送 link 频道名称 绑定频道。

发送 POST 请求触发推送

curl -X POST 'http://域名或IP/push' \
-H 'content-type: application/json' \
-d '{ "channelName": "频道名称", "text": "OK" }'

mp-push-nestjs's People

Contributors

brucexiong avatar brucx avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.