WireMock standalone binary
npm install wiremock-standalone


This package downloads WireMock standalone from Maven Central and provides simple CLI wrapper for NPM.
``bash`
npm i -D wiremock-standaloneOR
pnpm add -D wiremock-standaloneOR
yarn add -D wiremock-standalone
Usage (as script in package.json):
`json`
{
"scripts": {
"start:mock": "wiremock --root-dir ./mock"
}
}
By default, the latest stable jre8 version of WireMock JAR is downloaded from public Maven repository..wiremock
You can override this behavior by:
1. setting environment variables
2. creating configuration file in your project (JSON format)wiremock
3. adding property in your package.json
| ENV | JSON | Default |
| --- | --- | --- |
| MAVEN_REPO_URL | mavenRepoURL | https://repo1.maven.org/maven2 |WIREMOCK_VERSION
| | version | _resolved to the latest_ |JRE_VERSION
| | jreVersion | jre8 |
You can pass options to Java runtime with --java-arg CLI argument. All system properties are collected and appended to wiremock's --permitted-system-keys option.
`bash`
wiremock --java-arg -Dmy.custom.var=some-value --root-dir ./mock
`bash``
yarn env-cmd -f [path/to/.env] yarn wiremock --global-response-templating --verbose --root-dir ./mocks --permitted-system-keys=WIREMOCK_.*
If this project help you reduce time to develop, you can give me a cup of coffee :)
