purplefox/vert.x — pull request #78 by robfletcher (2012-04-13 12:13:17+00:00)
Title: Fix for incorrectly ordered code in JS web-app tutorial

I was following the JS tutorial using _beta5_ and got stuck at the point after adding the `SockJSBridge` to _web_server.js_. The chrome console showed a 404 for `http://localhost:8080/eventbus/info` and none of the static data appeared in the page.

After Googling I found [this thread][http://groups.google.com/group/vertx/browse_thread/thread/0e375c39d011a929/3d5711e54d4e657d?show_docid=3d5711e54d4e657d&pli=1] which suggested that the `SockJSBridge` needs to be initialized only _after_ the request handler is attached to the server. Sure enough, switching the example code around fixed the problem.

I've patched the markdown file with a corrected code sample.