Permalink
Browse files

Application skeleton

  • Loading branch information...
1 parent cd79fcd commit 0f2dc2dea2e12a3eb2098de846ea559071f2062c @burbas burbas committed Jul 7, 2012
@@ -0,0 +1 @@
+{deps, {[]}}.
@@ -0,0 +1,12 @@
+{application, browserquest_srv,
+ [
+ {description, ""},
+ {vsn, "1"},
+ {registered, []},
+ {applications, [
+ kernel,
+ stdlib
+ ]},
+ {mod, { browserquest_srv_app, []}},
+ {env, []}
+ ]}.
@@ -0,0 +1,16 @@
+-module(browserquest_srv_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+%% ===================================================================
+%% Application callbacks
+%% ===================================================================
+
+start(_StartType, _StartArgs) ->
+ browserquest_srv_sup:start_link().
+
+stop(_State) ->
+ ok.
@@ -0,0 +1,28 @@
+
+-module(browserquest_srv_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0]).
+
+%% Supervisor callbacks
+-export([init/1]).
+
+%% Helper macro for declaring children of supervisor
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+
+%% ===================================================================
+%% API functions
+%% ===================================================================
+
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+%% ===================================================================
+%% Supervisor callbacks
+%% ===================================================================
+
+init([]) ->
+ {ok, { {one_for_one, 5, 10}, []} }.
+
View
BIN rebar
Binary file not shown.
View
@@ -0,0 +1,11 @@
+{sub_dirs, ["apps/spawnquest_srv", "rel"]}.
+
+{deps, [
+ {cowboy, ".*", {git, "git://github.com/extend/cowboy.git", {tag, "HEAD"}}}
+ ]}.
+%% warn_export_all, ... log4erl has export all.
+{erl_opts, [debug_info, warn_shadow_vars, warn_obsolete_guard,
+ warn_unused_import, warnings_as_errors]}.
+
+{cover_print_enabled, true}.
+{cover_enabled, true}.

0 comments on commit 0f2dc2d

Please sign in to comment.