0.0.11 • Published 7 years ago

todo-mvc-service v0.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Todo MVC Service

A mock API for TodoMVC apps

Quick Start

import Todo from 'todo-mvc-service'

Todo.fetch('todos', {
  method: 'POST',
  body: {
    title: 'Buy milk',
    completed: false,
  }
})

Todo
  .fetch('/todos')
  .then(res => res.json())
  .then(todos => console.log('todos', todos))

Routes

console.log(Todo.routes)
└── /
    └── todos (GET|POST)
        └── /
            └── :id (GET)
                :id (PUT)
                :id (DELETE)

Known Issues

  • Does not work with UglifyJS, so create-react-app's prod mode does not work. I'm looking into changing the webpack config to transpile the dependencies (PR welcome... for the webpack experts in the audience 😃).
  • Needs tests

Demo

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago