Discussion:
[elm-discuss] Elm-reactor and static files (images & videos)
Fernando Martinez
2017-04-22 16:48:11 UTC
Permalink
Hello All!
I'm new to Elm and trying to build a small "playlist/carousel
app" (basically, a list of videos and images that passes one after the
other) to learn elm and try some ideas about ports.

I think I'm having a newie problem but I could not found a solution or
leads to a solution (or I couldn't undestand them :P), so I'm writing here.

I'm using the elm-reactor to develop and like very much the debbugger and
the automatic building.

So, my first question is: is it posible to serve static files (images and
videos) from the elm-reactor?
(From what I could observe, it returns an empty response. perhaps I'm
missing something?)

As a work around, I tried using a common http server to serve the app and
was able to have hotreloading using a file system watching library to
automatically build and reload the browser. But I lost the debugger :(

So, the second question, depending on how the first one goes. is: is there
any way to open the debugger outside of elm-reactor?


Thanks you very much!
Fernando.
--
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 elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Fernando Martinez
2017-04-22 22:39:46 UTC
Permalink
Hello again!

I kept investigating and found a possible fix. I just created a Pull
Request here:

https://github.com/elm-lang/elm-reactor/pull/228

Do let me know if I'm missing anything regarding contributions guidelines
or anything like that, don't want to start contributing here overriding
workflows and community ceremonies :P

Thanks very much!
Fernando




El sábado, 22 de abril de 2017, 19:33:29 (UTC-3), Fernando Martinez
Post by Fernando Martinez
Hello All!
I'm new to Elm and trying to build a small
"playlist/carousel app" (basically, a list of videos and images that
passes one after the other) to learn elm and try some ideas about ports.
I think I'm having a newie problem but I could not found a solution or
leads to a solution (or I couldn't undestand them :P), so I'm writing here.
I'm using the elm-reactor to develop and like very much the debbugger and
the automatic building.
So, my first question is: is it posible to serve static files (images and
videos) from the elm-reactor?
(From what I could observe, it returns an empty response. perhaps I'm
missing something?)
As a work around, I tried using a common http server to serve the app and
was able to have hotreloading using a file system watching library to
automatically build and reload the browser. But I lost the debugger :(
So, the second question, depending on how the first one goes. is: is there
any way to open the debugger outside of elm-reactor?
Thanks you very much!
Fernando.
--
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 elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Fernando Martinez
2017-04-22 22:41:04 UTC
Permalink
Hello again!

I kept investigating and found a possible fix. I just created a Pull
Request here:

https://github.com/elm-lang/elm-reactor/pull/228

Do let me know if I'm missing anything regarding contributions guidelines
or anything like that, don't want to start contributing here overriding
workflows and community ceremonies :P

Thanks very much!
Fernando
--
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 elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ian Mackenzie
2017-04-23 15:23:15 UTC
Permalink
You should be able to use the debugger outside of elm-reactor if you
compile with the --debug flag, for example

elm make --debug Main.elm --output main.js

You should then be able to use whatever you want to serve the HTML/JS and
you'll still get the debug overlay.
Post by Fernando Martinez
Hello All!
I'm new to Elm and trying to build a small
"playlist/carousel app" (basically, a list of videos and images that
passes one after the other) to learn elm and try some ideas about ports.
I think I'm having a newie problem but I could not found a solution or
leads to a solution (or I couldn't undestand them :P), so I'm writing here.
I'm using the elm-reactor to develop and like very much the debbugger and
the automatic building.
So, my first question is: is it posible to serve static files (images and
videos) from the elm-reactor?
(From what I could observe, it returns an empty response. perhaps I'm
missing something?)
As a work around, I tried using a common http server to serve the app and
was able to have hotreloading using a file system watching library to
automatically build and reload the browser. But I lost the debugger :(
So, the second question, depending on how the first one goes. is: is there
any way to open the debugger outside of elm-reactor?
Thanks you very much!
Fernando.
--
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 elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Arnau Orriols
2017-04-23 18:15:31 UTC
Permalink
FWIW,

As a work around, I tried using a common http server to serve the app and
Post by Fernando Martinez
was able to have hotreloading using a file system watching library to
automatically build and reload the browser. But I lost the debugger :(
Elm-live <https://github.com/tomekwi/elm-live> is basically what you have
described. I use it in all my projects as replacement of reactor, and I'm
quite happy.

You should be able to use the debugger outside of elm-reactor if you
Post by Fernando Martinez
compile with the --debug flag, for example
elm make --debug Main.elm --output main.js
You can use this:

elm-live Main.elm --output main.js --warn --debug --open
--
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 elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...