Is it possible on the server side to display the Haskell interface with Ghcjs, Haste, Elm, etc.?

I think Haskell offers fantastic opportunities. Also suitable for web development. However, one feature that I miss. Server side processing. The reasons are Google indexing crawlers and pre-rendering for better performance on mobile devices.

Is it possible on the server side to render the Haskell interface using Ghcjs, Haste, Elm, or with some other Haskell-> JS compiler?

+8
haskell elm web-frontend ghcjs haste
source share
2 answers

I do not believe that Alexander answered the question.

The question is whether the Haskell web frameworks do server-side rendering of JS or JS-via-Haskell JavaScript vanilla (GHCJS, Fay, etc.). I understand that Yesod does not pre-render JS (i.e., it runs JS and serves the resulting HTML). Rather, Yesod does server-side HTML generation through thin (or blaze-html or clear, depending on your preference).

The only library I could find for server-side Haskell JS rendering (for Angular) is:

https://github.com/danchoi/ngrender

But he is still in beta.

If there are other libraries / solutions, I would like to hear about them. This is a problem for me. I want to use purescript-halogen on the client, but ... SEO.

Edit: For now, the best option would be to use nginx as your load balancer in front of your Haskell server using prerender.io to provide displayed JS pages for searching bots:

https://github.com/prerender/prerender

https://gist.github.com/thoop/8165802

+4
source share

The Yesod stock brand does server-side rendering of HTML and has custom preprocessed languages ​​for HTML, CSS and JS. You should be able to integrate Fay / Purescript without any problems, given that they have been around for a while, and Yesod comes with stands for at least one of them.

For something like GHCJS integration, you will see great progress in future versions of the stack tool (e.g. this issue ). This will theoretically make the complete Haskell package reachable without much trouble. Now I understand that integrating GHCJS is nontrivial.

+3
source share

All Articles