Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@steemit/koa-jsonrpc

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@steemit/koa-jsonrpc

Spec compliant JSON-RPC 2.0 server middleware for Koa

  • 1.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@steemit/koa-jsonrpc

Build status: CircleCI

Spec compliant JSON RPC Server middleware for Koa

const Koa = require('koa')
const {JsonRpc} = require('@steemit/koa-jsonrpc')

const rpc = new JsonRpc()
rpc.register('my_method', async (foo, bar) => {
    return foo + bar
})

const app = new Koa()
app.use(rpc.middleware)
app.listen(8080)

$ curl -X POST -d '{"id":1,"jsonrpc":"2.0","method":"my_method","params":["honkey","tonk"]}' localhost:8080
{"jsonrpc":"2.0","id":1,"result":"honkeytonk"}

FAQs

Package last updated on 01 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc