Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832 mbed-http
Fork of HTTP-Python-Demo by
Diff: server/server.py
- Revision:
- 0:c5b042cf8162
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/server/server.py Tue Nov 14 14:26:53 2017 -0600
@@ -0,0 +1,18 @@
+from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
+import SocketServer
+import socket
+
+class MyHandler(BaseHTTPRequestHandler):
+
+ # HTTP REQUESTS HERE
+
+
+
+def run():
+ httpd = HTTPServer(('', 8080), MyHandler)
+ print "HTTP server running on port 8080"
+ print "Your IP address is: ", socket.gethostbyname(socket.gethostname())
+ httpd.serve_forever()
+
+if __name__ == '__main__':
+ run()
