feat(docs): Documentation and make the --port_number flag not required

This commit is contained in:
minhtrannhat 2023-11-26 16:20:26 -05:00
parent fac9988c7e
commit d1952d846b
Signed by: minhtrannhat
GPG Key ID: E13CFA85C53F8062
2 changed files with 21 additions and 1 deletions

View File

@ -1 +1,17 @@
# MyFTP
## Dependencies
Zero. Only python standard libs were used.
## Running
### Client
You can run `python3 src/myftp/client.py` to start the client or `python3 src/myftp/client.py --debug 1` for debugging purposes.
### Server
By default, the server IP address or hostname or server name will be `127.0.0.1` (also known as `localhost`). The `--port_number` flag, if not specified will be by default `12000`.
You can run `python3 src/myftp/server.py` to start the server or `python3 src/myftp/server.py --port_number <insert port number here> --debug 1` for debugging purposes and to specify the port number.

View File

@ -47,7 +47,11 @@ def init():
parser = ArgumentParser(description="A FTP server written in Python")
parser.add_argument(
"port_number", type=int, help="Port number for the server. Default = 12000"
"--port_number",
default=12000,
required=False,
type=int,
help="Port number for the server. Default = 12000",
)
parser.add_argument(