Skip to content

Instantly share code, notes, and snippets.

@ToddG
Created December 15, 2012 15:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ToddG/4296452 to your computer and use it in GitHub Desktop.
Save ToddG/4296452 to your computer and use it in GitHub Desktop.
simple launcher script to start an embedded yaws app
-module(launch).
%% API.
-export([start/0]).
%% API.
start() ->
{ok, Cwd} = file:get_cwd(),
Docroot = Cwd ++ "/webapp",
Sconf = [
{port,8080},
{docroot, Docroot},
{listen, {0,0,0,0}}
],
ok = yaws:start_embedded(Docroot, Sconf),
ok = application:start(myapp),
ok = sync:go().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment