adonis-websocket-wechatmp
v0.0.6
Published
WeChat Mini Program Websocket client for AdonisJs
Downloads
10
Maintainers
Readme
Websocket Client for WeChat Mini Programs
This plugin is built for developers using Adonis JS with Websockets enabled on the backend and WeChat Mini Programs on the frontend.
You can use all client APIs available in the official browser client (docs here):
Setup
- Install the package
npm install adonis-websocket-wechatmp
You may freely use this NPM package in 3rd party frameworks like Taro, Wepy, MPVue, etc.
Vanilla Framework: NPM package install guide
- Then in your Mini Program project:
/pages/page/page.js
import Ws from 'adonis-websocket-wechatmp' const ws = Ws('ws:// -or- wss://your-url-here') Page({ data: {}, onLoad () { // init websocket connection } })