diff bin/subserver @ 1041:a4632a7b2e17

upgrade knockout and jquery, simplify the static/ dirs for all web services Ignore-this: 8637b7b61cc5d38e8cf15bb1afd7466c
author Drew Perttula <drewp@bigasterisk.com>
date Wed, 28 May 2014 05:54:23 +0000
parents cfc748f4ad2e
children 473db8bebb8f
line wrap: on
line diff
--- a/bin/subserver	Tue May 27 07:34:58 2014 +0000
+++ b/bin/subserver	Wed May 28 05:54:23 2014 +0000
@@ -49,15 +49,7 @@
             return self.respondStaticJade("light9/subserver/%s.jade" %
                                           (path or 'index'))
             
-        oddlyPlaced = {
-            "websocket.js":        "light9/rdfdb/web/websocket.js",
-            "jquery-1.7.2.min.js": "light9/rdfdb/web/lib/jquery-1.7.2.min.js",
-        }
-        if path in oddlyPlaced:
-            self.write(open(oddlyPlaced[path]).read())
-            return
-
-        if path.endswith(".js") and path not in ['knockout-2.2.1.js']:
+        if path.endswith(".js"):
             return self.responseStaticCoffee(
                 'light9/subserver/%s' %
                 path.replace(".js", ".coffee")) # potential security hole
@@ -144,6 +136,7 @@
     reactor.listenTCP(port, cyclone.web.Application(handlers=[
         (r'/live', Live),
         (r'/snapshot', Snapshot),
+        (r'/static/(.*)', cyclone.web.StaticFileHandler, {'path': 'static/'}),
         (r'/(.*)', Static,
          {"path" : "light9/subserver",
           "default_filename" : "index.jade"}),