diff options
Diffstat (limited to 'presentations/erlang-2016/src/hello_server.erl')
-rw-r--r-- | presentations/erlang-2016/src/hello_server.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/presentations/erlang-2016/src/hello_server.erl b/presentations/erlang-2016/src/hello_server.erl new file mode 100644 index 000000000000..01df14ac57d5 --- /dev/null +++ b/presentations/erlang-2016/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. |