Giter Club home page Giter Club logo

mockbin's Introduction

Mockbin version License

Build Status Downloads Code Climate Coverage Status Dependencies Gitter

Mockbin is used internally and maintained by Mashape, who also maintain the open-source API Gateway Kong.

Table of contents

Features

  • uses HAR format
  • supports JSON, YAML, XML, HTML output
  • plays nice with proxies (uses the X-Forwarded-* headers for IP resolution)
  • allows for HTTP Method Override using the header X-HTTP-Method-Override or through query string parameter: _method
  • create custom bins for experimenting log collection

Installation

install from source or through npm:

npm install mockbin

Heroku

Deploy

read more on Installation.

Docker

Docker

read more on Installation.

Requirements

other than the dependencies listed in package.json The following are required:

Configuration

you will need to tell mockbin where Redis is:

npm config set mockbin:redis redis://127.0.0.1:6379

By Default the server will run on port 8080, you can customize the port like so:

npm config set mockbin:port 8001

read more on Configuration.

Running

After installing the npm package you can now start the server like so:

npm start

Usage

  Usage: mockbin [options]

  Options:

    -h, --help         output usage information
    -V, --version      output the version number
    -p, --port <port>  Port that the HTTP server will run on
    -r, --redis [dsn]  Redis dsn
    -q, --quiet        Disable console logging

Documentation

Read the full API documentation, please review the API Docs.

Bugs and feature requests

Have a bug or a feature request? Please first read the issue guidelines and search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

More over, if your pull request contains JavaScript patches or features, you must include relevant unit tests.

Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.

License

MIT © Mashape

mockbin's People

Contributors

sonicaghi avatar marcel-dias avatar thibaultcha avatar thomasleveil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.