Ever since I entered to IT industry, I was hearing about data science machine learning and the miracles happened because of these. On curiosity, I too have started learning some the concepts on these areas. As the first step, I have enrolled in Andrew N G's Machine Learning course. I will be sharing things I have learned in this blog and consider this post as an Index for my learning. Good Luck!!!
In this post we will cover topics;
Starting a server using Python Flask.Accessing server in Local Network.Adding a Port Forwarding rule in NAT settings.Accessing server in Internet via public IP.Difference between static IP and dynamic IP.
Step 1 :-
As the first step, we need to setup a server on our system.A server exposes your code to a particular port.Some examples are Apache Tomcat, Spring boot (inbuilt), Python Django (inbuilt), Nginx.
Here we have a simple server in Python Flask.
For a GET request in root path the server returns a "Hello World!".That's it.
Going to start the server on my local IP address(192.168.1.105) at default flask port(5000) using below commands,
$export FLASK_APP=flaskTest.py
$flask run --host=192.168.1.105
Step 2 :-
For security purpose all ports for external communication is closed by router's firewall by default. So no communication can be done to outside world. For same reason our server won't be available to other devices.
For our…
Starting a server using Python Flask.Accessing server in Local Network.Adding a Port Forwarding rule in NAT settings.Accessing server in Internet via public IP.Difference between static IP and dynamic IP.
Step 1 :-
As the first step, we need to setup a server on our system.A server exposes your code to a particular port.Some examples are Apache Tomcat, Spring boot (inbuilt), Python Django (inbuilt), Nginx.
Here we have a simple server in Python Flask.
For a GET request in root path the server returns a "Hello World!".That's it.
Going to start the server on my local IP address(192.168.1.105) at default flask port(5000) using below commands,
$export FLASK_APP=flaskTest.py
$flask run --host=192.168.1.105
Step 2 :-
For security purpose all ports for external communication is closed by router's firewall by default. So no communication can be done to outside world. For same reason our server won't be available to other devices.
For our…
Comments
Post a Comment