local server python code example
Example 1: python local server command
On Ubuntu go to Commands and hit these two commands->
cd folderName
python3 -m http.server 8080
Example 2: server on python
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()