Skip to content

Instantly share code, notes, and snippets.

@gippy
Last active January 2, 2018 13:28
Show Gist options
  • Save gippy/05600c6755706f1d9b33d48c5bbc5b1a to your computer and use it in GitHub Desktop.
Save gippy/05600c6755706f1d9b33d48c5bbc5b1a to your computer and use it in GitHub Desktop.
setup database
setup reporting with injected database
setup s3 client
setup sequential store with injected client and reporting
init routes
GET /sequential-stores
return all stores owned by the user from database
POST /sequential-stores
Create new store in database
return the store
GET /sequential-stores/:id
Get store document from database
DELETE /sequential-stores/:id
call sequentialStore.delete(:id)
GET /sequential-stores/:id/records?direction,offset,limit,format,pick,pluck,unwind,...
call sequentialStore.getStream(:id, offset,limit)
// this part is magic for now, probably for another article :)
apply transformations to the stream according to other query params
return stream
POST /sequential-stores/:id/records
const record = JSON.parse(BODY)
call sequentialStore.push(:id, record)
call reporting.afterPush(:id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment