bjnortier / shapesmith.deprecated

Open source HTML5 3D modelling
http://www.shapesmith.net
Other
160 stars 25 forks source link

basic erlang configuration questions #87

Closed ToddG closed 11 years ago

ToddG commented 11 years ago

I'm going over the erlang code, and trying to understand each piece. These notes are probably over-the-top, but I put my two questions at the top...

https://gist.github.com/3889116

  1. Why is webmachine both started as a dependency and started as a worker under api_sup.erl?
  2. In line [33], why are you getting the WEBMACHINE_IP from the environment?

-Todd

bjnortier commented 11 years ago

The webmachine startup is based on the webmachine template project, which does exactly that. It's not the app that's started in the supervisor, is the mochiweb handler. I assume there are other processes started as part of the webmachine application.

The second question is also from the webmachine template project - this can be changed to read it from the application configuration or default to 0.0.0.0, since environment variables are not used anywhere else