about summary refs log tree commit diff
path: root/src/hello_server.erl
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2016-09-22T13·37+0200
committerVincent Ambo <tazjin@gmail.com>2016-09-22T13·37+0200
commitfac2474ac66cd9a561844b1a6a8f9a91aa45e160 (patch)
tree76d8312e6e3e4945ab5f58b8ecb398ce4ebd071d /src/hello_server.erl
parent6c456a06c7166b70a2347283a7afcfc4107cb3c7 (diff)
Add the rest of the damn presentation
Diffstat (limited to 'src/hello_server.erl')
-rw-r--r--src/hello_server.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/hello_server.erl b/src/hello_server.erl
new file mode 100644
index 000000000000..01df14ac57d5
--- /dev/null
+++ b/src/hello_server.erl
@@ -0,0 +1,12 @@
+-module(hello_server).
+-export([start_server/0, server/0]).
+
+start_server() ->
+    spawn(fun() -> server() end).
+
+server() ->
+    receive
+        {greet, Name} ->
+            io:format("Hello ~s!~n", [Name]),
+            hello_server:server()
+    end.