here is the qpython3 script to run a simple HTTP server in your device..
put a file of name index.html in same directory in which this script is placed and run...and lo..server is running on local host..port 8080 http://localhost:8080
server.py
put a file of name index.html in same directory in which this script is placed and run...and lo..server is running on local host..port 8080 http://localhost:8080
server.py
import http.server
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()
print("serving at port", PORT)
httpd.serve_forever()
No comments:
Post a Comment