import tornado.ioloop
import tornado.web
import tornado.websocket
class Hello(tornado.websocket.WebSocketHandler):
def open(self):
self.write_message("Hello, world")
def on_message(self, message):
pass
def on_close(self):
pass
class Main(tornado.web.RequestHandler):
def get(self):
self.render("hello.html")
application = tornado.web.Application([
(r"/", Main),
(r"/websocket", Hello),
])
if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()<!DOCTYPE html>
<html>
<head>
<title>Tornado Hello</title>
</head>
<body>
<h1>Hello World from Tornado</h1>
<script>
ws = new WebSocket("ws://vast-harbor-19423.herokuapp.com/websocket");
ws.onmessage = function(e) {
alert('message received: ' + e.data);
};
</script>
</body>
</html>
There is the favicon.ico file in the root of the app folder.
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Tornado Web Server" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-tornado/4pfNm9TKAyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-tornad...@googlegroups.com.
I am creating a GWT project from the GWT Material official website using maven. I am following the tutorial offered by the site. Im getting this in the view page:
HTTP ERROR: 503
Problem accessing /index.html. Reason:
Service Unavailable
Powered by Jetty://I tried all the solution proposed here but I failed to view the project homepage.
There is no error in the eclipse console. but when inspecting the home page im getting this error:
Voice Instead ready.
content.js:29 Object
favicon.ico Failed to load resource: the server responded with a status of 503 (Service Unavailable)
enter code here--