Commits

Sean Wilkinson  committed 870245e

Now available: HTTPS, a debug page, and forced refresh for the app cache

  • Participants
  • Parent commits c2688a5

Comments (0)

Files changed (5)

File couchdb-app/Makefile

 APP         :=  quanah
 #URL         :=  http://localhost
 #DB          :=  localhost:5984/app
-URL         :=  http://quanah.couchone.com
-DB          :=  quanah.ic.ht:5984/app   #-  quanah.couchone.com:5984/app ... ?
+URL         :=  https://quanah.couchone.com
+DB          :=  quanah.ic.ht:5984/app
+#DB          :=  quanah.ic.ht:5984/app   #-  quanah.couchone.com:5984/app ... ?
 APPRC       :=  $(APP)/.couchapprc
 
 COUCHAPP    :=  $(call contingent, couchapp)
             $(CP) .couchappignore $(APP)/                               ;   \
             $(CP) filters $(APP)/                                       ;   \
             $(CP) rewrites.json $(APP)/                                 ;   \
+            echo "# $${RANDOM}" >> $(APP)/_attachments/cache.manifest   ;   \
             cd $(APP) && $(COUCHAPP) push -q                            ;   \
             if [ $$? -eq 0 ]; then                                          \
                 $(OPEN) $(URL)                                          ;   \

File couchdb-app/_attachments/cache.manifest

 NETWORK:
 *
 
-#-  EOF
+# EOF

File couchdb-app/_attachments/debug.html

+<!DOCTYPE html>
+<!--
+    debug.html ~~
+
+    This page is for debugging (obviously), but specifically it contains lots
+    of useful links that would annoy users, adds a "debug" query parameter,
+    and foregoes the application cache to help shows _exactly_ what is wrong.
+
+                                                        ~~ (c) SRW, 02 Nov 2011
+-->
+<html lang="en">
+  <head>
+    <meta charset="utf-8"/>
+    <meta name="author" content="Sean Wilkinson"/>
+    <title>Quanah: Debug</title>
+    <link rel="stylesheet" href="./style.css"/>
+    <link rel="shortcut icon" href="./favicon.ico"/>
+  <!--
+    Apple stuff
+  -->
+    <meta name="apple-mobile-web-app-capable" content="yes"/>
+    <meta name="apple-mobile-web-app-status-bar-style"
+        content="black-translucent"/>
+    <link rel="apple-touch-icon" href="./icon-iphone.png"/>
+    <link rel="apple-touch-icon" sizes="72x72" href="./icon-ipad.png"/>
+    <link rel="apple-touch-icon" sizes="114x114" href="./icon-iphone4.png"/>
+    <link rel="apple-touch-startup-image" href="./startup-image.png"/>
+  <!--
+    JavaScript
+  -->
+    <script src="./web-chassis.js"></script>
+  </head>
+  <body>
+    <noscript>Please enable JavaScript in your browser.</noscript>
+    <ul>
+      <li>
+        <a href="./index.html?debug=true">Home</a>
+      </li>
+      <li>
+        <a href="http://quanah.ic.ht/_log">Log</a>
+      </li>
+      <li>
+        <a href="http://goo.gl/tRxfM">Source</a>
+      </li>
+      <li>
+        <a href="./db/_changes?filter=quanah/queue&limit=20">Queue</a>
+      </li>
+    </ul>
+    <script src="./quanah.js"></script>
+    <script src="./fs.js"></script>
+  </body>
+</html>

File couchdb-app/_attachments/fs.js

         };
 
         doc = function (id) {
-            return 'http://' + global.location.host + '/db/' + id;
+            return global.location.protocol + '//' +
+                global.location.host + '/db/' + id;
         };
 
         isFunction = function (f) {

File couchdb-app/_attachments/index.html

       <li>
         <a href="http://goo.gl/tRxfM">Source</a>
       </li>
-      <li>
-        <a href="./db/_changes?filter=quanah/queue&limit=20">Queue</a>
-      </li>
     </ul>
     <script src="./quanah.js"></script>
     <script src="./fs.js"></script>