Now, we can run the api.py
script that launches Tornados's development server to compose and send HTTP requests to our unsecure and simple Web API. Execute the following command:
python api.py
The following lines show the output after we execute the previous command. The Tornado HTTP development server is listening at port 8888
:
Listening at port 8888
With the previous command, we will start the Tornado HTTP server and it will listen on every interface on port 8888
. Thus, if we want to make HTTP requests to our API from other computers or devices connected to our LAN, we don't need any additional configurations.
Tip
If you decide to compose and send HTTP requests from other computers or devices connected to the LAN, remember that you have to use the development computer's assigned IP address instead of localhost
. For example, if the computer's assigned IPv4 IP address is 192.168.1.103
, instead of localhost:8888
, you should use 192.168.1.103:8888
. Of...