0.0.11 • Published 8 years ago

todo-mvc-service v0.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
8 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

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago