Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including wiremock with all npm packages installed. Try it out:

wiremock lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("wiremock/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

wiremock v2.27.1

Wiremock Standalone wrapped in an NPM package so that it can be run with 'npx wiremock'.

Wiremock NPM

NPM Build Status

This is Wiremock Standalone wrapped inside an NPM package. It relies only on dependencies found in NPM. It is created with JDeploy and will use the existing JRE if found, or download one with node-jre.


Example - Command line

It can be used as a command line tool like this:

npx wiremock

Example - Mock API in frontend app

This example is in the repo in example-mock-api-with-express.

It starts a server with ExpressJS and delegates to a frontend and an API. When running npm run serve it will start this setup:

  |---[/api/*]-> http://localhost:8081/
    \-[*]------> http://localhost:8082/

So that:

  • http://localhost:8080/api/example Will serve the API with wiremock.
  • http://localhost:8080/whatever Will serve the frontend. This can be a Vue app or whatever.
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free