1.2.1 • Published 5 years ago

tsrpc-weapp v1.2.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
5 years ago

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

  1. Full stack in TypeScript
  2. Strong type check
  3. No URL conern
  4. Support both text and binary transport
  5. 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!
})