Skip to content
Browse files

Application skeleton with simple_bridge dependency

  • Loading branch information...
1 parent 47c489b commit 6a2e391fc0f14f1194db3b9db02a45b74c79c1e6 @yrashk committed Feb 15, 2011
Showing with 60 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. BIN rebar
  3. +1 −0 rebar.config
  4. +12 −0 src/socketio.app.src
  5. +16 −0 src/socketio_app.erl
  6. +28 −0 src/socketio_sup.erl
View
3 .gitignore
@@ -0,0 +1,3 @@
+ebin/socketio.app
+ebin/*.beam
+deps
View
BIN rebar
Binary file not shown.
View
1 rebar.config
@@ -0,0 +1 @@
+{deps, [{simple_bridge, ".*", {agner, "simple_bridge"}}]}.
View
12 src/socketio.app.src
@@ -0,0 +1,12 @@
+{application, socketio,
+ [
+ {description, ""},
+ {vsn, "1"},
+ {registered, []},
+ {applications, [
+ kernel,
+ stdlib
+ ]},
+ {mod, { socketio_app, []}},
+ {env, []}
+ ]}.
View
16 src/socketio_app.erl
@@ -0,0 +1,16 @@
+-module(socketio_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+%% ===================================================================
+%% Application callbacks
+%% ===================================================================
+
+start(_StartType, _StartArgs) ->
+ socketio_sup:start_link().
+
+stop(_State) ->
+ ok.
View
28 src/socketio_sup.erl
@@ -0,0 +1,28 @@
+
+-module(socketio_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}, []} }.
+

0 comments on commit 6a2e391

Please sign in to comment.
Something went wrong with that request. Please try again.