lots of small changes

This commit is contained in:
Arne Döring 2018-12-05 19:03:01 +01:00 • committed by Araq
commit a5ecbf823f
85 changed files with 180 additions and 110 deletions

View file

@ -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)

View file

@ -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!")