Skip to content

Instantly share code, notes, and snippets.

@dsabanin
Created March 21, 2012 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsabanin/2146349 to your computer and use it in GitHub Desktop.
Save dsabanin/2146349 to your computer and use it in GitHub Desktop.
Midge example
(fact "configuration"
server-port => number?
server-url => string?
server-static-path => string?)
(fact "on-connect handler"
(on-connect --connection--) => anything)
(fact "on-disconnect handler"
(on-disconnect --connection--) => anything)
(fact "on-message handler"
(on-message --connection-- "{\"data\": \"blah\", \"type\": \"hello\"}") => anything
(provided
(events/dispatch --connection-- {:data "blah" :type "hello"}) => truthy))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment