Skip to content

Commit

Permalink
add handler of /ROS_PACKAGE/?
Browse files Browse the repository at this point in the history
  • Loading branch information
furushchev committed Nov 2, 2013
1 parent 553e19f commit 60504b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roswww/nodes/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def create_webserver(packages):
handlers = [(r"/", MainHandler, {"packages": packages})]

for package in packages:
handler_root = ("/"+package['name']+"/?()", tornado.web.StaticFileHandler, {"path": package['path']+"/www/index.html" })
handlers.append(handler_root)
handler = ("/"+package['name']+"/(.*)", tornado.web.StaticFileHandler, {"path": package['path']+"/www", "default_filename": "index.html" })
handlers.append(handler)

Expand Down Expand Up @@ -117,4 +119,4 @@ def run_webserver():
rospy.logerr("Unable to bind webserver. Exiting. %s" % exc)

if __name__=='__main__':
run_webserver()
run_webserver()

0 comments on commit 60504b3

Please sign in to comment.