about summary refs log tree commit diff
path: root/src/hello_server.erl
diff options
context:
space:
mode:
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.