File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change 11defmodule 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 ,
Original file line number Diff line number Diff 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
1416end
You can’t perform that action at this time.
0 commit comments