public
Last active

simple launcher script to start an embedded yaws app

  • Download Gist
launch.erl
Erlang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
-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().

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.