Answers for "local server python"

4

python local server command

On Ubuntu go to Commands and hit these two commands->
cd folderName
python3 -m http.server 8080
Posted by: Guest on April-29-2020
1

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()
Posted by: Guest on May-18-2021
-1

server in python

def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
    server_address = ('', 8000)
    httpd = server_class(server_address, handler_class)
    httpd.serve_forever()
Posted by: Guest on August-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language