[newbie questions] templating engine integration, config file setup, logging

Metin Akat akat.metin at gmail.com
Fri Oct 22 03:07:29 EDT 2010


Hi,

Webmachine seems like e very nice piece of technology, so I'll give it
a try over the next weeks for my next hobby project.
I am a newbie to Erlang, so my question may be a little bit stupid. If
so, please excuse me.

1. I chose to use ErlyDTL for templating
http://github.com/evanmiller/erlydtl Now I need to find the "right"
way to integrate it in my webmachine package. I don't know what would
be right according to OTP principles. Generally, I'd like "make" to
compile my templates and put them in the right place, ready to be
accessed by my resource functions. I also need some way to access them
via some relative path (relative to my project root). I see webmachine
itself is accessed in a similar fashion but it's quite magical to me,
probably because of my lack of knowledge on erlang/otp.

2. What would be the right place to put my application's config file.
And what would be the right way to access it. As far as I can see,
current configuration options  (like address/port at which the website
listens on) are in myapp_sup.erl, which feels a bit wrong to me.

3. What is the right way to log stuff to files? I couldn't figure out
how webmachine does it.

Thanks in advance,
Metin



More information about the webmachine mailing list