[erlang-questions] Web frameworks

Davide Marquês nesrait@REDACTED
Sat May 2 13:48:40 CEST 2009


Hi Vikrant,

The hard part is getting "into erlang" but after that you won't have many
problems dealing with the available web frameworks.

Using Yaws you can build your webapps in various ways.
 - you can use .yaws files mixing html and <erl></erl> tags (kind of like
php)
 - use appmods (where certain URI segments are mapped to modules that export
a out/1 function)
 - use erlyweb (which is in fact hooked to yaws as an appmod)
For a simple application erlyweb application take a look at:
http://noe.dmitriid.com/
The code is available here: http://github.com/dmitriid/noe/tree/master

I find Mochiweb a bit easier to start with since you don't really have to
deal with Yaws' configuration files or "stand-alone VS embeded mode"
options.
For Mochiweb a good starting point is stickynotes:
Mochiweb -
http://beebole.com/en/blog/erlang/tutorial-web-application-erlang/

You also might want to take a look at:
Nitrogen - http://nitrogenproject.com/
BeepBeep - http://github.com/davebryson/beepbeep/tree/master
WebMachine -
http://blog.therestfulway.com/2008/09/webmachine-is-resource-server-for-web.html
and of course
ErlangWeb - http://www.erlang-web.org/

You can get a "Hello world" out of any of these but first you really have to
work your way into the language itself.
The error you got:
{"init terminating in
do_boot",{undef,[{myapp,start,[]},{init,start_it,1},{init,start_em,1}]}}
Is erlang complaining that it didn't find a start/0 function in module
myapp.
This might happen because myapp.beam is not in erlang's code path (you can
add directories to the code path when starting a erlang node using -pa <dir>
or -pz <dir>) or the start/0 function not being exported.

Best of luck,
:Davide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090502/e09505c8/attachment.htm>


More information about the erlang-questions mailing list