Index: sky/tools/sky_server |
diff --git a/sky/tools/sky_server b/sky/tools/sky_server |
index c826d56736fb6c2371701edb34b3652e9493fe3e..6cb536f35b2a3698aace71d947aa500fed334fa8 100755 |
--- a/sky/tools/sky_server |
+++ b/sky/tools/sky_server |
@@ -7,10 +7,14 @@ import argparse |
import os |
import cherrypy |
+ |
BUILD_DIRECTORY = 'out' |
CONFIG_DIRECTORY = 'Debug' |
-GEN_DIRECTORY = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, |
- os.pardir, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'gen')) |
+SRC_ROOT = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, |
+ os.pardir)) |
+SKY_ROOT = os.path.join(SRC_ROOT, 'sky') |
+GEN_ROOT = os.path.join(SRC_ROOT, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'gen') |
+ |
# FIXME: This doesn't yet support directory listings. We'll do something like: |
# http://tools.cherrypy.org/wiki/staticdirindex |
@@ -21,6 +25,7 @@ def main(): |
parser.add_argument('app_path', type=str) |
parser.add_argument('port', type=int) |
args = parser.parse_args() |
+ print os.path.abspath(args.app_path) |
abarth-chromium
2014/10/28 20:16:43
Spurious?
|
config = { |
'global': { |
@@ -30,14 +35,25 @@ def main(): |
'tools.staticdir.on': True, |
'tools.staticdir.dir': os.path.abspath(args.app_path), |
}, |
+ '/mojo': { |
+ 'tools.staticdir.on': True, |
+ 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'mojo'), |
+ }, |
'/sky': { |
'tools.staticdir.on': True, |
- 'tools.staticdir.dir': os.path.join(GEN_DIRECTORY, 'sky'), |
+ 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'sky'), |
}, |
- '/mojo': { |
+ # src-relative to avoid needing to rebuild when changing inspector: |
+ '/sky/framework': { |
+ 'tools.staticdir.on': True, |
+ 'tools.staticdir.dir': |
+ os.path.join(SKY_ROOT, 'framework'), |
+ }, |
+ '/sky/framework/inspector/server': { |
'tools.staticdir.on': True, |
- 'tools.staticdir.dir': os.path.join(GEN_DIRECTORY, 'mojo'), |
- } |
+ 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'sky', 'framework', |
+ 'inspector', 'server'), |
+ }, |
} |
cherrypy.quickstart(config=config) |