about summary refs log blame commit diff
path: root/presentations/erlang-2016/src/hello_server.erl
blob: 01df14ac57d5360e01f7f12897453651dbf5763d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
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.