Skip to content

Instantly share code, notes, and snippets.

@oleksmarkh
Last active December 6, 2016 20:16
Show Gist options
  • Save oleksmarkh/5d23a442902cb89f9f2df5cc6ee99509 to your computer and use it in GitHub Desktop.
Save oleksmarkh/5d23a442902cb89f9f2df5cc6ee99509 to your computer and use it in GitHub Desktop.
typical API "request -> ... -> response" flow
router          <- method + URL
authentication  <- middleware
controller      <- function/class
  request         <- object
  command         <- pattern
    validation      <- rules
    CRUD/search     <- models
    authorization   <- throwing exception
    quota           <- filter
  response        <- object
logger          <- middleware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment