Prepare smoother future updates
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 12 Mar 2020 16:30:04 +0000 (17:30 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 12 Mar 2020 16:30:04 +0000 (17:30 +0100)
.gitignore
client/dist/.gitkeep [new file with mode: 0644]
hooks/post-update.dist
server/app.js
server/fallback/README [new file with mode: 0644]
server/while_update/favicon.ico [deleted file]
server/while_update/index.html [deleted file]

index 0fafd87..82f780c 100644 (file)
@@ -1,8 +1,10 @@
 # Various files
-/hooks/post-update
 /server/db/vchess.sqlite
 /server/config/parameters.js
-/client/dist/
+/server/fallback/*
+!/server/fallback/README
+/client/dist/*
+!/client/dist/.gitkeep
 /client/src/parameters.js
 
 # Dependency directories#
diff --git a/client/dist/.gitkeep b/client/dist/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
index 46eff66..3d4099c 100755 (executable)
@@ -14,4 +14,5 @@ if [ $clientLines -ne 0 ]; then
        cd client
        npm run build
 fi
-# TOOD: also should restart the service if server code changes
+
+# NOTE: should also restart the service if server code changes
index d029c95..785088b 100644 (file)
@@ -31,7 +31,7 @@ app.use(cookieParser());
 // Client "prod" files:
 app.use(express.static(path.join(__dirname, 'static')));
 // Update in progress:
-app.use(express.static(path.join(__dirname, 'while_update')));
+app.use(express.static(path.join(__dirname, 'fallback')));
 
 // In development stage the client side has its own server
 if (params.cors.enable)
diff --git a/server/fallback/README b/server/fallback/README
new file mode 100644 (file)
index 0000000..4365b1d
--- /dev/null
@@ -0,0 +1,2 @@
+Fallback folder to server while server updates.
+Updated after each client code update.
diff --git a/server/while_update/favicon.ico b/server/while_update/favicon.ico
deleted file mode 100644 (file)
index 7b26be1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#$# git-fat 79e7b6b353fa77bdb2ab20fcb86055db27175b91                 9662
diff --git a/server/while_update/index.html b/server/while_update/index.html
deleted file mode 100644 (file)
index db6b0c7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>vchess - club</title>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <style>
-      #container {
-        position: absolute;
-        width: 100%;
-        top: 30%;
-      }
-      p {
-        text-align: center;
-        font-weight: bold;
-        font-size: 2rem;
-      }
-    </style>
-  </head>
-  <body>
-    <div id="container">
-      <p>Website update in progress !</p>
-      <p>It won't be long. Don't worry :)</p>
-    </div>
-  </body>
-</html>