node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

@alphatr/koa-wechat

Wechat middleware for koa 2

install

npm install --save @alphatr/koa-wechat

how to use

app.use(wechat('token').middleware((ctx, next) => {
    const message = ctx.state.wechat;
    // do something 
 
    ctx.body = 'response';
    return next();
});