@hermes-chat/adonis-rpc
v0.1.13
Published
RPC Provider for Adonis 5
Downloads
4
Readme
@hermes-chat/adonis-rpc
Adonis 5 RPC Provider
[![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]
Transport agnostic RPC provider for Adonis 5
Installation
Setup redis from this manual and
npm i @hermes-chat/adonis-rpc
node ace configure @hermes-chat/adonis-rpc
Usage
Client mode
import Route from '@ioc:Adonis/Core/Route'
import RPC from '@ioc:Hermes/RPC'
Route.get('example', () => {
const { data: result } = await RPC.call('example', {data: 'message'})
return result
})