format(docs): easier to read
This commit is contained in:
parent
a5debc437a
commit
0717e32a25
5
Makefile
5
Makefile
@ -15,3 +15,8 @@ client-no-debug:
|
||||
clean:
|
||||
docker-compose down --volumes
|
||||
|
||||
docker-client:
|
||||
docker exec -it project-ftp_client-1 bash
|
||||
|
||||
docker-server:
|
||||
docker exec -it project-ftp_server-1 bash
|
||||
|
14
README.md
14
README.md
@ -1,14 +1,18 @@
|
||||
# MyFTP
|
||||
|
||||
A Python implementation of a FTP server. Supports both TCP and UDP protocols. Tested on Python 3.11 and Python 3.10.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Zero. Only python standard libs were used. Tested on Python 3.11
|
||||
Zero. Only python standard libs were used.
|
||||
|
||||
## Running
|
||||
|
||||
### Client
|
||||
|
||||
You can run `python3 src/myftp/client.py --directory <insert valid directory that you have read/write permissions>` to start the client or `python3 src/myftp/client.py --debug 1 --directory <insert valid directory that you have read/write permissions>` for debugging purposes.
|
||||
You can run `python3 src/myftp/client.py --directory <insert valid directory that you have read/write permissions>` to start the client.
|
||||
|
||||
To run with debug info: `python3 src/myftp/client.py --debug 1 --directory <insert valid directory that you have read/write permissions>`.
|
||||
|
||||
Some example test commands:
|
||||
|
||||
@ -23,7 +27,9 @@ Some example test commands:
|
||||
|
||||
By default, the server IP address or hostname or server name will be `0.0.0.0` or `localhost` (meaning it will bind to all interfaces). The `--port_number` flag, if not specified will be by default `12000`.
|
||||
|
||||
You can run `python3 src/myftp/server.py --directory <insert valid directory that you have read/write permissions>` to start the server or `python3 src/myftp/server.py --ip_addr <insert ip addr of the server> --port_number <insert port number here> --debug 1 --directory <insert valid directory that you have read/write permissions>` for debugging purposes and to specify the port number.
|
||||
You can run `python3 src/myftp/server.py --directory <insert valid directory that you have read/write permissions>` to start the server.
|
||||
|
||||
Or run `python3 src/myftp/server.py --ip_addr <insert ip addr of the server> --port_number <insert port number here> --debug 1 --directory <insert valid directory that you have read/write permissions>` for debugging purposes.
|
||||
|
||||
## Localhost testing
|
||||
|
||||
@ -55,6 +61,8 @@ Run `python3 src/myftp/server.py --debug 1 --directory server_directory`
|
||||
- Run the server with `make server` in a terminal.
|
||||
- Run the client with `make client` in a terminal.
|
||||
- For the client, when asked to put in the ip address and port number of the server, you can put in `ftp_server 12000` or adjust to your chosen port number. The IP address is resolved by Docker so ftp_server can not be changed.
|
||||
- Go into the `client` docker container with `make docker-client`. The folder in which FTP is using to host client files is located at `/client_directory/`
|
||||
- Or go into the `server` docker container with `make docker-server`. The folder in which FTP is using to host server files is located at `/server_directory/`
|
||||
- Tear down everything with `make clean`.
|
||||
|
||||
#### Fast setup
|
||||
|
Loading…
x
Reference in New Issue
Block a user