Mimic is our open-source dev tool for mocking server responses in a browser.
Front end and back end are often developed separately. While the back end is not working, the front-end developer is very limited in what they can do. But with Mimic, they just mock server responses right from within the browser and develop as if the server was alive.
Let’s say the server part is not implemented yet, so when the client side makes a request, an error occurs. The Mimic shows this in the browser’s status bar:
The developer changes the server response to what they need:
Now whenever a page makes this request, Mimic intercepts it and returns a mocked response (shown in the status bar in blue):
Depending on what you develop and test for, you may need to set up particular HTTP headers, add a timeout, or even simulate a response with a file.
That’s what the full-featured mocks editor is for:
To install, add to your packages:
npm install mimic --save
Import into your application: