Send index.html on all ajax views, fix public file includes
authorchapel <jacob.chapel@gmail.com>
Sun, 13 Nov 2011 21:01:30 +0000 (13:01 -0800)
committerchapel <jacob.chapel@gmail.com>
Sun, 13 Nov 2011 21:01:30 +0000 (13:01 -0800)
app.js
public/index.html

diff --git a/app.js b/app.js
index 212b30d2a21f16b3a56a9922f8cf576881ba3d1c..7c98b192a6d91923dc02a69b477a260dcb38ac04 100644 (file)
--- a/app.js
+++ b/app.js
@@ -433,7 +433,7 @@ function checkAjax( req, res, next ) {
   if ( req.xhr ) {
     next();
   } else {
-    res.redirect( '/' );
+    res.sendfile( 'public/index.html' );
   }
 }
 
index b2dde817a5c453bde6d85b63fa41ed54ea56810b..38c6c42d7b67dce15d467a6962938b49e622c58f 100644 (file)
@@ -6,13 +6,13 @@
 
                <!-- XXX Some SEO here would be nice -->
 
-               <link rel='stylesheet' href='stylesheets/fc2.css'>
+               <link rel='stylesheet' href='/stylesheets/fc2.css'>
 
-               <script type='text/javascript' src='javascripts/jquery.min.js'></script>
-               <script type='text/javascript' src='javascripts/es5-shim.min.js'></script>
-               <script type='text/javascript' src='socket.io/socket.io.js'></script>
-               <script type='text/javascript' src='javascripts/protodiv.js'></script>
-               <script type='text/javascript' src='javascripts/main.js'></script>
+               <script type='text/javascript' src='/javascripts/jquery.min.js'></script>
+               <script type='text/javascript' src='/javascripts/es5-shim.min.js'></script>
+               <script type='text/javascript' src='/socket.io/socket.io.js'></script>
+               <script type='text/javascript' src='/javascripts/protodiv.js'></script>
+               <script type='text/javascript' src='/javascripts/main.js'></script>
 
                <meta name="viewport" content="width=device-width,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0">
                <meta name="apple-touch-icon" href=""> <!-- XXX -->