Skip to content
Provides a mock JSON-RPC API given an OpenRPC document.
JavaScript TypeScript
Branch: master
Clone or download
BelfordZ Merge pull request #155 from open-rpc/dependabot/npm_and_yarn/master/…

build(deps-dev): bump jest from 24.8.0 to 24.9.0
Latest commit 62618aa Aug 21, 2019


CircleCI branch Dependabot status Chat on Discord npm GitHub release GitHub commits since latest release

Provides a mock JSON-RPC API with Service Discovery for a given OpenRPC document.



Installing the open-rpc-mock-server in your local project.

npm install --save @open-rpc/mock-server


Optimize usage by adding script for open-rpc-mock-server in package.json.

"scripts": {
    "mock-server": "open-rpc-mock-server"

The mock-server will look for an openrpc.json document in the working directory that contains a valid OpenRPC based API. Otherwise the mock-server will return an error message.

Run mock-server

npm run mock-server

The mock-server will run at http://localhost:3333/.

Sending requests

With the mock-server running at http://localhost:3333/, use Postman to send requests against the API.



How to contribute, build and release are outlined in, and respectively. Commits in this repository follow the specification.

You can’t perform that action at this time.