Helper for mocking slow and broken services.
The server offers following end points:
/status/{code}
= Returns Http Response with specified response code/ok
= Http Response200
/error
= Http Response500
/forbidden
= Http Response403
/delay/{ms}/status/{code}
= Returns Http Response with specified response code/delay/{ms}/ok
= Http Response200
/delay/{ms}/error
= Http Response500
/delay/{ms}/forbidden
= Http Response403
/delay/{ms}/url/{path}
= Delayed proxy to given url (base path is defined in PROXY_URL)
PORT
= Server portPROXY_TIMEOUT
= Timeout for proxyPROXY_URL
= Base url for/delay/{ms}/url/{path}
(path is added as is to the base url for proxying)SSL_KEY
= Path to the ssl key.pemSSL_CERT
= Path to the ssl cert.pem
Start by running node server.js
If you are using this behind corporate proxy use HTTP_PROXY
and HTTPS_PROXY
env variables to configure it.