Skip to content

Commit

Permalink
Updated to reflect the yaws:start_embedded/N functions.
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1008 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Tobbe Tornquist committed Sep 5, 2006
1 parent 1aad2b4 commit a3f0f90
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions www/embed.yaws
Expand Up @@ -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.
Expand Down

0 comments on commit a3f0f90

Please sign in to comment.