An open API service indexing awesome lists of open source software.

https://github.com/zhaotoday/mp-server

Server-side utilities for mini-program.小程序服务端工具库。
https://github.com/zhaotoday/mp-server

Last synced: 7 months ago
JSON representation

Server-side utilities for mini-program.小程序服务端工具库。

Awesome Lists containing this project

README

          

## 使用

安装

```bash
$ npm install --save mp-server
```

初始化

```js
const mp = require('mp-server')
const auth = new mp.Auth({ appid, secret })
```

## 模块

Auth

```js
const codeToSessionRes = await auth.codeToSession({ code })
const decryptedData = auth.decryptData({
sessionKey,
encryptedData,
iv
})
```