commit fe28a2943c3369057b75606d51a03016e3d74de0
parent bda2e8346097066bf35ccfcb13e7059c894ab86e
Author: ctucx <c@ctu.cx>
Date: Sun, 19 Jan 2020 14:03:42 +0100
parent bda2e8346097066bf35ccfcb13e7059c894ab86e
Author: ctucx <c@ctu.cx>
Date: Sun, 19 Jan 2020 14:03:42 +0100
now uses envVars
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/serial2tcp.nim b/src/serial2tcp.nim @@ -44,8 +44,10 @@ proc readSerial(serial: string) {.async.} = let line = await file.asyncReadLine() broadcast(line & '\n') -let port = parseInt(paramStr(1)) -let serial = paramStr(2) +let port = parseInt(getEnv("PORT")) +let serial = getEnv("SERIAL_DEVICE") + + asyncCheck serveTcp(port) asyncCheck readSerial(serial) runForever()