feat: add address option
muxueqz zhangmingyuan240@gmail.com
Thu, 13 Jun 2019 11:04:39 +0800
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/nimhttpd.nim
→
src/nimhttpd.nim
@@ -34,6 +34,7 @@ directory The directory to serve (default: current directory).
Options: -p, --port The port to listen to (default: 1337). + -a, --address The address to listen to (default: 127.0.0.1). """ % [name, version, description, author]@@ -176,6 +177,8 @@ quit(0)
of "version", "v": echo version quit(0) + of "address", "a": + address = val of "port", "p": try: port = Port(val.parseInt)