bbyars/mountebank

View on GitHub
src/views/docs/cli/replay.ejs

Summary

Maintainability
Test Coverage
<pre><code>mb replay [options]</code></pre>

<p>The <code>replay</code> command is a convenience that removes all proxies,
effectively switching from record mode to replay mode. Assuming
mountebank is running on port 3000, you would run the following command:</p>

<pre><code>mb replay --port 3000</code></pre>

<p>That will reset the imposter configuration by sending a <code>PUT</code> command to /imposters
based on the current configuration, excluding the proxies (using the
<code>?removeProxies=true</code> query parameter). The following options are available:</p>

<table>
  <tr>
    <th style='width: 12em;'>Option</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><code>--port 2525</code></td>
    <td>The port of the running the mountebank server</td>
    <td><code>2525</code></td>
  </tr>
  <tr>
    <td><code>--host mbserver.local</code></td>
    <td>The hostname of the running mountebank server</td>
    <td><code>localhost</code></td>
  </tr>
  <tr>
    <td><code>--rcfile .mbrc</code></td>
    <td>The run commands file containing startup configuration (a JSON-equivalent representation
      of the command line arguments). When the same option is listed
    in both the <code>rcfile</code> and the command line, the command line option takes
    precedence.</td>
    <td><code>N/A</code></td>
  </tr>
  <tr>
    <td><code>--help</code></td>
    <td>Show help for the command</td>
    <td><code>N/A</code></td>
  </tr>
</table>