Skip to content

dfordivam/reflex-yesod-websockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

reflex-yesod-websockets

Do communication between Reflex frontend and Yesod backend using websocket protocol.

This will compile and run the yesod server on port 3000

cd backend; stack build; stack exec reflex-yesod-websockets-backend

For compiling front-end use the script from reflex-platform

/path/to/reflex-platform/work-on ghcjs ./frontend
cd frontend; cabal configure --ghcjs && cabal build

Then open the generated index.html in browser.

Note that if you open localhost:3000 directly in browser then it will use the page from yesod instead, which essentially does the same work as reflex frontend.

Yesod code has been taken from (https://github.com/yesodweb/yesod/blob/master/yesod-websockets/sample.hs)

Reflex code from (https://github.com/reflex-frp/reflex-examples/blob/master/websocket-echo/src/Main.hs)

Releases

No releases published

Packages

No packages published