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:
Example - Mock API in frontend app
This example is in the repo in
It starts a server with ExpressJS and delegates to a frontend and an API. Like this:
npm run serve it will start this setup:
http://localhost:8080/ | | |---[/api/*]-> http://localhost:8081/ | \ \-[*]------> http://localhost:8082/
http://localhost:8080/api/exampleWill serve the API with
http://localhost:8080/whateverWill serve the frontend. This can be a Vue app or whatever.