Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including recuest with all npm packages installed. Try it out:

var recuest = require("recuest")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

recuest v0.0.1

API testing proxy

Rec-uest helps you better debug API's by allowing you to record, and twiddle http requests on the fly.


  • Faster debugging since testing is done locally
  • Automated testing made easier
  • Easier to debug any outlying issues with API responses
  • Simulate server states
    • server outages



npm install recuest -g

Terminal Usage

Usage: --env=[env] [config paths]

  --env  [default: "default"]


Here's an example where the proxy might simulate a 500 internal server error:

recuest --env=default,500 /path/to/config.json

And here's /path/to/config.json:

    "default": {
        "port": 8080,
        "profile": "default",
        "db": {
            "driver": "Mongo",
            "port": 27017,
            "host": "",
            "database": "recuest"
    "500": {
        "profile": "500",
        "twiddle": {
            "response": [
                    "fiddle": {
                        "$set": {
                            "statusCode": 500,
                            "body": "A 500 internal server error has occurred."

In your node.js app, make sure to use this chunk of code:

//monkey-patches the http module so all requests redirect through the proxy
    host: "http://localhost:8080"

var request = require("request");

//redirects through the proxy
request.get("", function(err, response, body) {

Finally, call node ./my/app.js, and you should see A 500 internal server error has occurred.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free