mirage-pretender

0.1.1 • Public • Published

Mirage Pretender JS

This repo contains all the code allow MirageJS to use Pretender as its interceptor.

Documentation

To tell Mirage which interceptor you wish to use, update the server config

import { createServer } from "miragejs"
import PretenderInterceptor from 'mirage-pretender';

export default function () {
  createServer({
    interceptor: new PretenderInterceptor(),  
    routes() {
      this.get("/api/reminders", () => ({
        reminders: [],
      }))
    },
  })
}

Package Sidebar

Install

npm i mirage-pretender

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

27.3 kB

Total Files

8

Last publish

Collaborators

  • ianvs
  • bgantzler