
== Getting started with mochiweb

Run this command to create an empty web
application project:

$ escript @PREFIX@/lib/erlang/lib/mochiweb/scripts/new_mochiweb.erl myapp
$ cd myapp
$ make
$ chmod u+x start-dev.sh
$ ./start-dev.sh

Then open a new terminal tab, because then current
one becomes an erlang shell. There do:

$ open http://localhost:8000

Your default browser should open and show a page
containing "MochiWeb running."

Start developing by modifiying
src/APPNAME_web.erl, in the main loop case construct.

Example:

 "congrat" ->
     Req:ok({"text/html", [],["<h1>Congratulation</h1>"]});

Example taken from BeeBuzz blog [1].

1. http://beebole.com/blog/2008/09/25/

C. Florian Ebeling <febeling@macports.org>
2008-10-03
