Hello community,

I thought that using elm on the backend would be hard but it turns out that
it is easy.

I took the websockets example and turned it into a stand alone webapp.
https://github.com/pdamoc/elm-sapling

The approach that I used is to describe an API between the client and the
server.

This API uses types for Requests that the client sends to the server and
for Responses that the server replies with. The types are imported in both
the server and the client.
The API file also takes care of serialization of the communication.

The server code is then compiled to a js file that is launched with the
help of a small express+ws wrapper.

The client code is compiled into an index file that will be served by
express.

What do you think?

I'm wondering if there is any interesest in creating a full-stack solution
for Elm.
I'm not able to do this alone but maybe a small SIG could create such a
thing.





-- 
There is NO FATE, we are the creators.
blog: http://damoc.ro/

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to