summaryrefslogtreecommitdiff
path: root/src/server/rz_server.py
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-02-17 12:52:24 +0200
committerAlon Levy <alon@pobox.com>2015-02-17 12:52:37 +0200
commitedf91a5ab2a6afa88999403af5b11b722bb0b378 (patch)
tree9b4a24506fc1b5ddf04b172948d165d02bca6f5a /src/server/rz_server.py
parent72c0463055f534c642a57b35ab17ec6c1d6c89a5 (diff)
client/server: support optimizing with require.js using node run r.js
built is controlled by property do-client-optimize which defaults to false. Even if the optimized main is built (single file main-built.js and source map file main-built.js.map) they are not used unless rhizi-config.conf client_optimize is set to True which causes app.js to use main-built.js and not main.js The resulting file is 687 KiloBytes large. Pretty scary, but it still loads faster this way. (from very small tests locally). This is without compression done by the server.
Diffstat (limited to 'src/server/rz_server.py')
-rw-r--r--src/server/rz_server.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/rz_server.py b/src/server/rz_server.py
index 20f0b30f..6868317f 100644
--- a/src/server/rz_server.py
+++ b/src/server/rz_server.py
@@ -57,6 +57,9 @@ class Config(object):
cfg['static_url_path'] = '/static'
cfg['user_db_path'] = os.path.join(cfg['config_dir'], 'user_db.db')
+ # client configuration
+ cfg['optimized_main'] = False
+
# Mail settings
cfg['mail_hostname'] = 'localhost'
cfg['mail_port'] = 25