Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

v0.10.0 🍁

Choose a tag to compare

@sergeysova sergeysova released this 03 Jul 22:22
· 76 commits to master since this release
v0.10.0
ce2a68f

Features

const routes = createRest(root => {
  // GET /demo      read()
  // POST /demo     create()
  // PUT /demo      update()
  // DELETE /demo   destroy()
  root.crud('demo', DemoController, {}, demo => {
    // GET /demo/example   example()
    demo.get('example', function example(){})
    
    // GET /demo/foobar
    // POST /demo/foobar
    // PUT /demo/foobar
    // DELETE /demo/foobar
    demo.crud('foobar', FooBarController, {}, foobar => {
      // POST /demo/foobar/band   band()
      foobar.post('band', function band(){})
    })
  })
})