Skip to content

Instantly share code, notes, and snippets.

@ncammarata
Created January 1, 2015 23:51
Show Gist options
  • Select an option

  • Save ncammarata/b17e188dcba4f1b4bbe0 to your computer and use it in GitHub Desktop.

Select an option

Save ncammarata/b17e188dcba4f1b4bbe0 to your computer and use it in GitHub Desktop.
Flint = require('Flint')
api = Flint.api
colors = api.collection 'colors', {
add: (item) ->
remove: (id) ->
change: (id, newItem) ->
}
db.onAddColor = (item) -> colors.send "add", item
api.run(3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment