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

@open-rpc/mock-server

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-rpc/mock-server

Provides a mock JSON-RPC API given an OpenRPC Document

  • 1.7.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4K
increased by71.04%
Maintainers
2
Weekly downloads
 
Created
Source

open-rpc-mock-server

CircleCI branch Dependabot status npm GitHub release GitHub commits since latest release

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

Need help or have a question? Join us on Discord!

Install

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

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

or install it globally

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

Usage

If you installed it globally:

open-rpc-mock-server -d my-open-rpc-document.json

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.

Example

Contributing

How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.

FAQs

Package last updated on 11 Dec 2020

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