Noteworthy Programming Masterpiece

npm

Need private packages and team management tools?Check out npm Orgs. »

wiremock

2.25.0 • Public • Published

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.

See: http://wiremock.org/docs/running-standalone/

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. Like this:

When running npm run serve it will start this setup:

http://localhost:8080/
  |
  |
  |---[/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.

Keywords

install

npm i wiremock

Downloadsweekly downloads

54

version

2.25.0

license

Apache 2

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability