lastday4you

lastday4you

Server side rendering with phoenix and elm

any guide or clue on how to achieve that ?

Most Liked

OvermindDL1

OvermindDL1

Last I checked Elm was not at all Server-rendering friendly, so you may not be able to as of yet. Even when it is capable of it, it cannot compile to a native backend or NIF like OCaml or Rust or so can so you’d end up having to run an instance of nodejs on the server too, which is a bit blehg… ^.^;

easco

easco

I think you meant to ask how to achieve that.

The problem is that Elm generates JavaScript that is designed to be run in a browser context (ie, where a DOM is available). Presumably you could get server side rendering using something like a headless browser?

Last Post!

lastday4you

lastday4you

I see, thank you for the information. currently I am hacking my way by inject the meta tag using the phoenix rendering template instead. even though it have to do two round trip for the same data but at least it was way easier.

Where Next?

Popular in Questions Top

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement