Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imhazige/simpleddp-wechat-miniprogram-dirver
微信小程序Meteor DDP协议整合驱动,基于simpleddp,支持uniapp,wepy
https://github.com/imhazige/simpleddp-wechat-miniprogram-dirver
ddp-client meteor wechat-mini-program wei-xin-xiao-cheng-xu
Last synced: 3 months ago
JSON representation
微信小程序Meteor DDP协议整合驱动,基于simpleddp,支持uniapp,wepy
- Host: GitHub
- URL: https://github.com/imhazige/simpleddp-wechat-miniprogram-dirver
- Owner: imhazige
- Created: 2019-08-12T06:58:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T07:24:34.000Z (about 5 years ago)
- Last Synced: 2024-11-03T00:06:33.786Z (3 months ago)
- Topics: ddp-client, meteor, wechat-mini-program, wei-xin-xiao-cheng-xu
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simpleddp-wechat-miniprogram-dirver
整合[meteor DDP 协议](https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md)(使用[simpleddp](https://github.com/Gregivy/simpleddp))和微信小程序,支持[uniapp](https://uniapp.dcloud.io/)和[wepy](https://wepyjs.github.io/wepy-docs/index.html)
## uniapp中使用
`npm install simpleddp simpleddp-plugin-login simpleddp-wechat-miniprogram-dirver --save````javascript
const simpleDDP = require('simpleddp');
const simpleDDPLogin = require('simpleddp-plugin-login').simpleDDPLogin;import { UniappDriver } from 'simpleddp-wechat-miniprogram-dirver/UniappDriver';
const config = {
endpoint: "ws://localhost:3000/websocket",
SocketConstructor: UniappDriver,
reconnectInterval: 5000
};
const server = new simpleDDP(config, [simpleDDPLogin]);```
## wepy中使用
`npm install simpleddp simpleddp-plugin-login simpleddp-wechat-miniprogram-dirver --save````javascript
const simpleDDP = require('simpleddp');
const simpleDDPLogin = require('simpleddp-plugin-login').simpleDDPLogin;import { WepyDriver } from 'simpleddp-wechat-miniprogram-dirver/WepyDriver';
const config = {
endpoint: "ws://localhost:3000/websocket",
SocketConstructor: WepyDriver,
reconnectInterval: 5000
};
const server = new simpleDDP(config, [simpleDDPLogin]);```
## 具体DDP协议使用
参见[simpleddp文档](https://github.com/Gregivy/simpleddp)