Environment
- Python 2.7.10
- Mozilla firefox 41.0.2
- Windows command prompt
- 8080 is the default port Files
- webserver.py (Server code)
- client.py(Client side code)
- test.html (used as the test file)
- All the files are in the same folder Running webserver.py on command prompt
- webserver.py <port_no> (In the localhost ip creates the <port_no> & listens for clients)
- webserver.py (In the localhost ip creates the 8080 as default port & listens for clients) Running webserver.py on phyton IDE
- On Python 2.7.10 IDE -> open module->f5 or run Testing in browser
- http://127.0.0.1:8080/test.html
- http://localhost:8080/test.html
- If file name is different 404 is sent Running client.py on command prompt
- client.py 127.0.0.1 test.html
- client.py localhost test.html
- client.py localhost test.html
- wrong file name gives a 404
- wrong port number raises an error