Skip to content

Instantly share code, notes, and snippets.

@aymanosman
Created April 16, 2015 23:09
Show Gist options
  • Save aymanosman/5368f339dcd70a9b74b8 to your computer and use it in GitHub Desktop.
Save aymanosman/5368f339dcd70a9b74b8 to your computer and use it in GitHub Desktop.
growler
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent
import Web.Growler
import Web.Growler.EventSource
import Network.Wai.EventSource
main = growl id defaultConfig $ get "/" $ eventSource es
es = threadDelay 3000000 >> (return $ ServerEvent Nothing Nothing ["Hello"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment