Skip to content

Instantly share code, notes, and snippets.

@laser
Last active August 29, 2015 14:11
Show Gist options
  • Save laser/8d43fb8fef039dd9af68 to your computer and use it in GitHub Desktop.
Save laser/8d43fb8fef039dd9af68 to your computer and use it in GitHub Desktop.
Connecting to a database
application input: HttpInput (HTTP request body)
|
|
+--> wrap-json-body: Hash Map
|
|
+--> post-notes-handler: Hash Map
|
|
+--> validate-note: [Hash Map, Error String]
|
|
+--> create-note: [ID, Error String] (from db)
|
|
+--> assoc: Hash Map (add id from db)
|
|
+--> ok: Hash Map (HTTP response, status code 200)
|
|
+--> wrap-json-response: JSON String
|
|
+--> application output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment