Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using elm-reactor with Elm embedded in HTML?

So I'm trying out Elm and WebRTC together. However for WebRTC I need some interop to javascript. So I created an index.html with the needed script includes, for both WebRTC and main.js.

However, I am using elm-reactor. Which is super nice. But there is no main.js. I can create it with elm-make, but then I would have to manually update it.

So, is there a way to have elm-reactor work together with embedded elm?

Note: I'm using Elm 0.18, latest as of writing.

like image 200
The Oddler Avatar asked Dec 26 '16 16:12

The Oddler


2 Answers

You might want to look at elm-live.

It has the same options that elm-reactor has, but you can use your own index.html.

like image 159
Michael Vashchinsky Avatar answered Oct 20 '22 22:10

Michael Vashchinsky


As of today(0.18.0), officially you can not use elm-reactor for embedding your application into custom HTML. It is also impossible to have port subscriptions with elm-reactor without additional setup.

Consider using something like Create Elm App or alternatives.

like image 22
halfzebra Avatar answered Oct 20 '22 21:10

halfzebra