README
TSRPC WeChat APP
TSRPC
Client for WeChat App
TSRPC
is a full-stack rpc framework in TypeScript, see it at https://github.com/k8w/tsrpc
Features
- Full stack in TypeScript
- Strong type check
- No URL conern
- Support both text and binary transport
- Suppport customized transport encryption
Usage
npm install tsrpc-weapp
import { TsrpcClient } from 'tsrpc-weapp';
import PtlHelloWorld from './protocol/PtlHelloWorld';
let client = new TsrpcClient({ serverUrl: 'http://localhost:3000' })
// The same with TSRPC NodeJS Client
client.callApi(PtlHelloWorld, { name: 'k8w' }).then(res => {
console.log(res.reply); //Hello, k8w!
})