dtro-devuk Knowledge Base

Logo

A curated list of helpful material on some of my Development Stack

View the Project on GitHub dtro-devuk/KnowledgeBase

Mirage JS - API Mocking

Overview

Mirage JS is an API mocking library for Vue.js, React, Angular and Ember frameworks.

Its lightweight and powerful, and out of the boxz, allows you to test real world production API consumption scenarios… e.g. simulating a slow network with its timing option.

Intro

Build complete frontend features, even if your API doesn’t exist.

According to official documentation

“Mirage JS is an API mocking library that lets you build, test and share a complete working JavaScript application without having to rely on any backend services.”

How?

“Mirage uses an in-memory database to maintain the referential integrity of your application data. This lets you build out fully dynamic features, even ones that depend on data-fetching and persistence logic, without ever leaving your frontend codebase.”

Install

npm install --save-dev miragejs

Tutorials

Sources