This package has been deprecated

Author message:

Please use `tsrpc-miniapp`

tsrpc-weapp
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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!
})

Install

DownloadsWeekly Downloads

0

Version

1.2.1

License

Apache-2.0

Unpacked Size

31.5 kB

Total Files

11

Last publish

Collaborators

  • k8w