Frontend Mocking Made Easy

When developing web applications with JavaScript locally, it is not uncommon to request data from an API. However, the API might not actually exist yet, or we might want to control what the responses are. Typically, this sort of problem has been solved by either writing a separate mock API service alongside the project (i.e. having a Node service running locally with your application) or creating a development database that replicates staging or production environments.

Both of these approaches are heavy and can lead to using incorrect data if schemas are out of sync. data-mocks is an open source library that aims to allow rapid local JavaScript development without the dependency of a database or fully implemented APIs. You can use it with React, Angular or just plain JavaScript.

Video producer: