all repos — nimhttpd @ 810ad353f6c817ccf445bbf71da44fc401f25c02

A useful static file web server.

feat: add address option
muxueqz zhangmingyuan240@gmail.com
Thu, 13 Jun 2019 11:04:39 +0800
commit

810ad353f6c817ccf445bbf71da44fc401f25c02

parent

91ac711138d852c71ab2dbc0f6bd72dc87e6fc36

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/nimhttpd.nimsrc/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)