all repos — nimhttpd @ 3fab27f855dc4bccecdfcc467e5d20cf79c6a500

A useful static file web server.

Merge pull request #1 from muxueqz/master

feat: add address option
Fabio Cevasco h3rald@h3rald.com
Wed, 26 Jun 2019 10:36:19 +0200
commit

3fab27f855dc4bccecdfcc467e5d20cf79c6a500

parent

549f4f45584f7a5c6b29dd8115702f6a15af9da4

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]

@@ -180,6 +181,8 @@ quit(0)

of "version", "v": echo version quit(0) + of "address", "a": + address = val of "port", "p": try: port = Port(val.parseInt)