source: trunk/dports/erlang/mochiweb/files/README.MacPorts @ 97636

Last change on this file since 97636 was 69988, checked in by nox@…, 10 years ago

Do not hardcode prefix in mochiweb's README

File size: 737 bytes
Line 
1
2== Getting started with mochiweb
3
4Run this command to create an empty web
5application project:
6
7$ escript @PREFIX@/lib/erlang/lib/mochiweb/scripts/new_mochiweb.erl myapp
8$ cd myapp
9$ make
10$ chmod u+x start-dev.sh
11$ ./start-dev.sh
12
13Then open a new terminal tab, because then current
14one becomes an erlang shell. There do:
15
16$ open http://localhost:8000
17
18Your default browser should open and show a page
19containing "MochiWeb running."
20
21Start developing by modifiying
22src/APPNAME_web.erl, in the main loop case construct.
23
24Example:
25
26 "congrat" ->
27     Req:ok({"text/html", [],["<h1>Congratulation</h1>"]});
28
29Example taken from BeeBuzz blog [1].
30
311. http://beebole.com/blog/2008/09/25/
32
33C. Florian Ebeling <febeling@macports.org>
342008-10-03
Note: See TracBrowser for help on using the repository browser.