Permalink
Browse files

Updated to reflect the yaws:start_embedded/N functions.

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1008 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
Tobbe Tornquist
Tobbe Tornquist committed Sep 5, 2006
1 parent 1aad2b4 commit a3f0f90c6ee00dc5c44dd1f68e8be360056451ed
Showing with 31 additions and 0 deletions.
  1. +31 −0 www/embed.yaws
View
@@ -138,6 +138,37 @@ out(A) ->
</ol>
+ <h2>The quick and easy way to get in the air</h2>
+ <p>The following two functions yaws:start_embedded/1 and
+ yaws:start_embedded/4 will start Yaws in embedded mode
+ and provide the minimal information that Yaws requires.</p>
+ <p>NB: With this method you don't need to specify any -yaws switches
+ to your (system) start script.</p>
+ <p>The only thing that you really need to specify is the "DocRoot", i.e
+ the directory path to where your .html and .yaws files lives.
+ You will then get default values for your server name ("localhost"),
+ listen port (8888) and the IP address you will listen to ({0,0,0,}
+ which means all IP addresses on your machine).</p>
+ <p>By using yaws:start_embedded/4 you can set some other values
+ than the default ones. See the example below:</p>
+<div class="box">
+ <pre>
+%%
+%% Check with inet:i(). that you are listening to port 8888!
+%%
+1> yaws:start_embedded("/home/tobbe/docroot").
+
+%%
+%% Alternative way
+%%
+1> yaws:start_embedded("/home/tobbe/docroot", "sej", 8080, {192,168,128,42}).
+ </pre>
+</div>
+
+ <p>If you need more control on how to setup Yaws in embedded mode,
+ then read on.</p>
+
+
<h2> A very small actual example </h2>
<p>We provide a minimal example which "embeds" yaws in
a normal Erlang shell.

0 comments on commit a3f0f90

Please sign in to comment.