Giter Club home page Giter Club logo

proxy-recorder's Introduction

proxy-recorder

proxy with recording capabilities for easy mocking of 3rd party APIs.

install

npm i proxy-recorder --save-dev

Default directory where jsons of responses are stored is relative directory test/fixtures/

##API exposes just two methods so far:

const proxyR = require('proxy-recorder')
const opts = {port: 8100, target: 'https://api.github.com'}

proxyR.rec(opts);	//fires up a proxy to github which records any response going trough
//and then for testing
proxyR.mock(opts)	// recorded message is retrieved from filesystem based on url and body of the message and mocked server sends the fixture back

##Other projects

I tried using this project for mocking github api and it was not possible, so I discarded this project as a viable solution for me. Otherwise it has the same goals and much bigger history, so it might be worth looking at. ###How does this differ from node-replay? Node replay can store mocks inside node, but doesn't help you when you need an API mock as separate node instance running side by side your single page app. Proxy recorder was made out of a need specificaly to mock Github API for E2E tests of frontend app.

proxy-recorder's People

Contributors

capaj avatar

Stargazers

Erki avatar Josh Miller avatar Domenico Solazzo avatar Matteo Crippa avatar Jean-Thierry BONHOMME avatar Alexandru Vlăduţu avatar Chris Nguyen avatar Romain avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

domenicosolazzo

proxy-recorder's Issues

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.