From e64438c25ee85944a82086e7ab6bda8ded205a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Tue, 4 Dec 2018 09:53:09 +0100 Subject: [PATCH] Disable mocks docs --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 36f17db..9c6b497 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ That command will start to serve your mocks on port `9090` by default. [-t | --toPath] with default value `` [-c | --capture] with default value `false` [-v | --verbose] with default value `false` + [-d | --disable-mocks] with default value `false` These arguments are optional. You can use `mockit` command with any one of them or any combination of them. @@ -117,3 +118,20 @@ module.exports = { When capture mode enabled, if you don't have a mock file for a request and if you have a proxy definition, a mock file will automatically generated for you for successful responses from your origin. +### Disabling mocks + +You can also disable mocks to just use it as proxy via `--disable-mocks` cli parameter or `disableMocks` property in config file. + + +```js +module.exports = { + port: 9090, + map: { + '/api': { + target: 'mocks/api', + proxy: 'https://api.yourdomain.com', + disableMocks: true + } + } +} +```