Installing with Stack
decapo01 opened this issue · 4 comments
decapo01 commented
Is there a way I can install and use fay with stack? Having a shared library then server that serves an api and client that call the server.
swamp-agr commented
Hi @decapo01,
Could you please try this repo?
- Clone repo.
- Execute command:
stack install --flag="front:examples"
- Server: https://github.com/swamp-agr/front/blob/master/examples/todo/YesodTodo.hs
- Shared: https://github.com/swamp-agr/front/blob/master/examples/todo/Shared.hs
- Client (pre-compiled): https://github.com/swamp-agr/front/blob/master/fay/Client.hs
I am kindly ask you to tell me about the issues if they appeared.
decapo01 commented
Thanks! I'll try and give it a shot this weekend.
chtenb commented
How would I install fay using stack when I'm only interested in client-side use?
decapo01 commented
Better late than never....I tried to install this with stack install --flag="font:examples"
and get this error
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock servant-auth-cookie > /tmp/stack-d0c1376b4458700c/servant-auth-cookie-0.6.0.3/src/Servant/Server/Experimental/Auth/Cookie.hs:139:28: error:
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock servant-auth-cookie > Module ‘Servant’ does not export ‘ServantErr(..)’
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock servant-auth-cookie > |
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock servant-auth-cookie > 139 | import Servant (addHeader, ServantErr (..))
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock servant-auth-cookie > | ^^^^^^^^^^^^^^^
Also I've noticed in the the example you provided that the Client
does not import anything from the Shared
. Is that possible?