diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-12-05 19:03:01 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-11 21:23:22 +0100 |
commit | a5ecbf823f178c2800d40bcff562bc4eca0f2030 (patch) | |
tree | 50c3812eaa7a1100c30623755263d4ef35dd1c3b /tests/niminaction/Chapter3/ChatApp | |
parent | c0c35839cc65717283edda72ce34579b992563ca (diff) | |
download | Nim-a5ecbf823f178c2800d40bcff562bc4eca0f2030.tar.gz |
lots of small changes
Diffstat (limited to 'tests/niminaction/Chapter3/ChatApp')
-rw-r--r-- | tests/niminaction/Chapter3/ChatApp/src/protocol.nim | 2 | ||||
-rw-r--r-- | tests/niminaction/Chapter3/ChatApp/src/server.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/niminaction/Chapter3/ChatApp/src/protocol.nim b/tests/niminaction/Chapter3/ChatApp/src/protocol.nim index af515861c..4c122d4cc 100644 --- a/tests/niminaction/Chapter3/ChatApp/src/protocol.nim +++ b/tests/niminaction/Chapter3/ChatApp/src/protocol.nim @@ -37,7 +37,7 @@ proc createMessage*(username, message: string): string = "message": %message }) & "\c\l" -when isMainModule: +when true: block: let data = """{"username": "dom", "message": "hello"}""" let parsed = parseMessage(data) diff --git a/tests/niminaction/Chapter3/ChatApp/src/server.nim b/tests/niminaction/Chapter3/ChatApp/src/server.nim index 31da74d16..fbf0e5110 100644 --- a/tests/niminaction/Chapter3/ChatApp/src/server.nim +++ b/tests/niminaction/Chapter3/ChatApp/src/server.nim @@ -79,7 +79,7 @@ proc loop(server: Server, port = 7687) {.async.} = # Check whether this module has been imported as a dependency to another # module, or whether this module is the main module. -when isMainModule: +when true: # Initialise a new server. var server = newServer() echo("Server initialised!") |