Skip to content

Commit e64438c

Browse files
committed
Disable mocks docs
1 parent f4ad5c1 commit e64438c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ That command will start to serve your mocks on port `9090` by default.
2727
[-t | --toPath] with default value ``
2828
[-c | --capture] with default value `false`
2929
[-v | --verbose] with default value `false`
30+
[-d | --disable-mocks] with default value `false`
3031

3132
These arguments are optional. You can use `mockit` command with any one of them or any combination of them.
3233

@@ -117,3 +118,20 @@ module.exports = {
117118

118119
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.
119120

121+
### Disabling mocks
122+
123+
You can also disable mocks to just use it as proxy via `--disable-mocks` cli parameter or `disableMocks` property in config file.
124+
125+
126+
```js
127+
module.exports = {
128+
port: 9090,
129+
map: {
130+
'/api': {
131+
target: 'mocks/api',
132+
proxy: 'https://api.yourdomain.com',
133+
disableMocks: true
134+
}
135+
}
136+
}
137+
```

0 commit comments

Comments
 (0)