Skip to content

Commit 4d05bf0

Browse files
committed
Fixing TCP demo
1 parent 54ec6ed commit 4d05bf0

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

lib/chorex_examples.ex

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
11
defmodule ChorexExamples do
2-
@moduledoc """
3-
Documentation for `ChorexExamples`.
4-
"""
5-
6-
@doc """
7-
Hello world.
8-
9-
## Examples
10-
11-
iex> ChorexExamples.hello()
12-
:world
13-
14-
"""
15-
def hello do
16-
:world
17-
end
18-
192
def start_server() do
203
Chorex.start(
214
Tcp.ListenerChor.Chorex,

lib/mix/tasks/demo/tcp.ex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ defmodule Mix.Tasks.Demo.Tcp do
66
require Logger
77

88
def run(_args) do
9-
Logger.info("Starting up the TCP handler...")
10-
ChorexExamples.start_server()
11-
Logger.info("Started; connect in another terminal window with `nc localhost 4242`")
9+
host = System.get_env("HOSTNAME")
10+
Logger.info("Started")
11+
Logger.info("In another terminal window, connect to this container with")
12+
Logger.info(" docker exec -it #{host} bash")
13+
Logger.info("And then connect to the socket with `nc 127.0.0.1 4242`")
1214
IO.gets("Press 'ENTER' to quit")
1315
end
1416
end

0 commit comments

Comments
 (0)