summaryrefslogtreecommitdiff
path: root/scripts/proxy
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-10-02 07:59:30 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-10-02 07:59:30 (UTC)
commit1180b7b195157aaeb4f0d5380e0c886bbd06c2e2 (patch) (unidiff)
tree709e33a09d9325d382aabaf0a0828e20ebdb96db /scripts/proxy
parent20bea94ab6b91c85b171dcf86baba0a64169d508 (diff)
downloadclipperz-1180b7b195157aaeb4f0d5380e0c886bbd06c2e2.zip
clipperz-1180b7b195157aaeb4f0d5380e0c886bbd06c2e2.tar.gz
clipperz-1180b7b195157aaeb4f0d5380e0c886bbd06c2e2.tar.bz2
Updated /delta
Switched from less to scss. Still no build script to update the final CSS, though. Added preliminary support for storing account data on browser's local storage for offline viewing. No public backend currently support this feature.
Diffstat (limited to 'scripts/proxy') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/proxy/main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/proxy/main.py b/scripts/proxy/main.py
index 8ce4989..58a4d7f 100755
--- a/scripts/proxy/main.py
+++ b/scripts/proxy/main.py
@@ -43,16 +43,20 @@ class ClipperzTestSite(server.Site):
43 contentType = 'text/html' 43 contentType = 'text/html'
44 absoluteFilePath = os.path.join(projectTargetDir(), 'dev', version, pathParts[2]) 44 absoluteFilePath = os.path.join(projectTargetDir(), 'dev', version, pathParts[2])
45 result = static.File(absoluteFilePath, contentType) 45 result = static.File(absoluteFilePath, contentType)
46 elif pathParts[2].endswith('.webapp'): 46 elif pathParts[2].endswith('.webapp'):
47 contentType = 'application/x-web-app-manifest+json' 47 contentType = 'application/x-web-app-manifest+json'
48 # absoluteFilePath = os.path.join(projectTargetDir(), 'dev', version, pathParts[2]) 48 # absoluteFilePath = os.path.join(projectTargetDir(), 'dev', version, pathParts[2])
49 absoluteFilePath = os.path.join(projectBaseDir(), 'frontend', version, 'properties', pathParts[2]) 49 absoluteFilePath = os.path.join(projectBaseDir(), 'frontend', version, 'properties', pathParts[2])
50 result = static.File(absoluteFilePath, contentType) 50 result = static.File(absoluteFilePath, contentType)
51 elif pathParts[2].endswith('.appcache'):
52 contentType = 'text/cache-manifest'
53 absoluteFilePath = os.path.join(projectBaseDir(), 'frontend', version, 'properties', pathParts[2])
54 result = static.File(absoluteFilePath, contentType)
51 else: 55 else:
52 #http://homer.local:8888/beta/css/clipperz/images/loginInfoBackground.png 56 #http://homer.local:8888/beta/css/clipperz/images/loginInfoBackground.png
53 #pathParts: ['', 'beta', 'css', 'clipperz', 'images', 'loginInfoBackground.png'] 57 #pathParts: ['', 'beta', 'css', 'clipperz', 'images', 'loginInfoBackground.png']
54 try: 58 try:
55 imagePathIndex = pathParts.index('images') 59 imagePathIndex = pathParts.index('images')
56 resourceType = 'images' 60 resourceType = 'images'
57 for _ in range(2, imagePathIndex): 61 for _ in range(2, imagePathIndex):
58 del pathParts[2] 62 del pathParts[2]
@@ -88,15 +92,16 @@ class ClipperzTestSite(server.Site):
88 92
89 93
90 return result 94 return result
91 95
92 96
93 97
94def main (): 98def main ():
95 site = ClipperzTestSite(proxy.ReverseProxyResource('localhost', 8080, '/java-backend')) 99 site = ClipperzTestSite(proxy.ReverseProxyResource('localhost', 8080, '/java-backend'))
100 #site = ClipperzTestSite(proxy.ReverseProxyResource('www.clipperz.com', 443, '/'))
96 reactor.listenTCP(8888, site) 101 reactor.listenTCP(8888, site)
97 reactor.run() 102 reactor.run()
98 103
99 104
100if __name__ == "__main__": 105if __name__ == "__main__":
101 main() 106 main()
102 107