Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set up mock API server for isolating frontend-backend dependencies

Tags:

mocking

api

Our application is a API based one wherein the frontend relies on REST API calls to the back end. This sometimes creates a problem wherein the frontend team can't move forward unless the backend API's have been implemented since they invariably progress at different speeds. Is there a way to set up a server so that the front-ent can work independently regardless of the backend status ?

like image 780
pup784 Avatar asked Dec 23 '12 03:12

pup784


People also ask

What is an API mock server?

A mock API server or mock server API imitates a real API server by providing realistic mock API responses to requests. They can be on your local machine or the public Internet. Responses can be static or dynamic, and simulate the data the real API would return, matching the schema with data types, objects, and arrays.


1 Answers

I know this is a bit of an old post but I created a tool just for this purpose and I thought I should share it for anyone who stumbles across it.

It's called Interfake and you can find it at https://github.com/basicallydan/interfake. I frequently use it for prototyping APIs which haven't been built yet, in fact that is my main use of it. I hope that helps.

like image 57
basicallydan Avatar answered Oct 06 '22 01:10

basicallydan