Skip to content

mockpy command line configurations

Omar Abdelhafith edited this page Jul 2, 2015 · 2 revisions

Mockpy can be started as a standalone web server or as a proxy web server.

Web server mode

mockpy start
Starts mockpy as a standalone web server on port 9090

mockpy start --port PORT
To change the default port

Web proxy mode

mockpy start --proxy
Starts mockpy as a proxy web server, This will set both HTTP and HTTPS proxy on your machine. In order to make HTTPS works correctly, you need to install the SSL certificate. Read HTTPS proxying SSL certificates for more info.

mockpy start -x --no-https
Normally mockpy updates mac web proxy configuration for the HTTP and HTTPS connections, by passing --no-https we prevent mockpy from settings the HTTPS proxy.

mockpy start --proxy --no-proxy-update
By default mockpy will change mac web proxy settings to point to the started proxy server, by passing --no-proxy-update you opt out from changing mac web proxy which means you have to change the web proxy on mac settings manually

Changing inout and res folders

mockpy start --inout INOUT
changes the inout directory that contains the YAML files, by default this mockpy will search for an inout directory in the current working directory

mockpy start --res RES
changes the res directory that contains the static files (JSON/HTML/PNG/Etc...), by default this mockpy will search for a res directory in the current working directory

For more info run mockpy start --help on your terminal