summaryrefslogtreecommitdiff
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-05-03 09:08:32 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-05-03 09:08:32 (UTC)
commited2375435d8a2bb5ae6185761619b49ea7f98778 (patch) (side-by-side diff)
tree31baf4f56f0f254aad04e0730008b7d647ae8858
parent6336f032985eb14a21fd089d322002210095a0a7 (diff)
downloadclipperz-ed2375435d8a2bb5ae6185761619b49ea7f98778.zip
clipperz-ed2375435d8a2bb5ae6185761619b49ea7f98778.tar.gz
clipperz-ed2375435d8a2bb5ae6185761619b49ea7f98778.tar.bz2
Added instructions on how to do actual development, using the dev-proxy script
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index aabb00e..b15887d 100644
--- a/README.md
+++ b/README.md
@@ -71,4 +71,28 @@ Besides PHP and Python, more backends are in the works, most notably a node.js v
+### Developing
+To support the development of the application, a few extra tools have been built, the most useful one being `dev-proxy`.
+This script, located in `scripts/dev-proxy`, is invoked without any parameters (to simplify daily usage) and all its configurations are hard coded into the actual code it executes: `scripts/proxy/main.py`.
+
+The aim of this proxy is to mask the actual location of frontend JS files from the actual backend handling requests.
+
+When executed, this script will start listening on localhost:8888.
+
+All 'backend' requests (whose path starts with either `/json` or `/dump`) will be forwarded to the actual backend, that is configured as a `ReverseProxyResource` (in the current code: `proxy.ReverseProxyResource('localhost', 8084, '/java-backend')`).
+All other requests (html files, Javascript code, CSS stylesheets and other resources) will be handled by reading the resource from the filesystem; the proxy is aware of the layout of the project, so it will be able to locate the right resource in the right place.
+
+The only file that needs to be `build`, and not read directly from the file system, is the `index.html` file.
+
+In order to build this file, the following command should be executed:
+
+ ./scripts/build --frontends beta gamma gamma.mobile --backends dev
+
+
+Once the index.html files have been built (one for each frontend) and a backend is running and has been correctly configured in the proxy script, it is possible to access the different versions of the application at the following URLs:
+ - `http://localhost:8888/beta/index.html`
+ - `http://localhost:8888/gamma/index.html`
+ - `http://localhost:8888/gamma/index.mobile.html`
+
+
## Installing
@@ -88,5 +112,5 @@ Besides PHP and Python, more backends are in the works, most notably a node.js v
## Disclaimer
-The resulting application has not been fully tested, so there may be still problems due to the new build script or some other changes that were done due to the new repository structure. So, for the moment, **use it at your own risk!**
+This application has not been fully tested, so there may be still problems due to the new build script or to the new repository structure. So, for the moment, **use it at your own risk!**