summaryrefslogtreecommitdiff
path: root/priv/templates/simplesrv.erl
diff options
context:
space:
mode:
Diffstat (limited to 'priv/templates/simplesrv.erl')
-rw-r--r--priv/templates/simplesrv.erl49
1 files changed, 49 insertions, 0 deletions
diff --git a/priv/templates/simplesrv.erl b/priv/templates/simplesrv.erl
new file mode 100644
index 0000000..8db932e
--- /dev/null
+++ b/priv/templates/simplesrv.erl
@@ -0,0 +1,49 @@
+-module({{srvid}}).
+-behaviour(gen_server).
+-define(SERVER, ?MODULE).
+
+%% ------------------------------------------------------------------
+%% API Function Exports
+%% ------------------------------------------------------------------
+
+-export([start_link/0]).
+
+%% ------------------------------------------------------------------
+%% gen_server Function Exports
+%% ------------------------------------------------------------------
+
+-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
+
+%% ------------------------------------------------------------------
+%% API Function Definitions
+%% ------------------------------------------------------------------
+
+start_link() ->
+ gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
+
+%% ------------------------------------------------------------------
+%% gen_server Function Definitions
+%% ------------------------------------------------------------------
+
+init(Args) ->
+ {ok, Args}.
+
+handle_call(_Request, _From, State) ->
+ {noreply, ok, State}.
+
+handle_cast(_Msg, State) ->
+ {noreply, State}.
+
+handle_info(_Info, State) ->
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+%% ------------------------------------------------------------------
+%% Internal Function Definitions
+%% ------------------------------------------------------------------
+