diff --git a/README.md b/README.md index eb85bd5..1ca25e7 100644 --- a/README.md +++ b/README.md @@ -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 --debug 1` for debugging purposes and to specify the port number. diff --git a/src/myftp/server.py b/src/myftp/server.py index 667478c..8270833 100644 --- a/src/myftp/server.py +++ b/src/myftp/server.py @@ -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(