Ver código fonte

Merge pull request #35 from Musare/staging

Optimizations and small changes
Vos 7 anos atrás
pai
commit
98221589ea

+ 3 - 3
README.md

@@ -62,7 +62,7 @@ Once you've installed the required tools:
    	The `apis.discord.loggingChannel` is the Discord logging channel id.  
    	The `apis.mailgun` values can be obtained by setting up a [Mailgun account](http://www.mailgun.com/).  
    	The `redis.url` url should be left alone for Docker, and changed to `redis://localhost:6379/0` for non-Docker.
-   	The `redis.password` should be the Redis password you either put in your `startRedis.cmd` file for Windows, or `docker-compose.yml` for docker.
+   	The `redis.password` should be the Redis password you either put in your `startRedis.cmd` file for Windows, or `.env` for docker.
    	The `mongo.url` needs to have the proper password for the MongoDB musare user, and for non-Docker you need to replace `@musare:27017` with `@localhost:27017`.  
    	The `cookie.domain` value should be the ip or address you use to access the site, without protocols (http/https), so for example `localhost`.   
    	The `cookie.secure` value should be `true` for SSL connections, and `false` for normal http connections.  
@@ -179,9 +179,9 @@ Steps 1-4 are things you only have to do once. The steps to start servers follow
 
 5. Create a file called `startRedis.cmd` in the main folder with the contents:
 
-		"D:\Redis\redis-server.exe" "D:\Redis\redis.windows.conf"
+		"D:\Redis\redis-server.exe" "D:\Redis\redis.windows.conf" "--requirepass" "PASSWORD"
 
-	And again, make sure that the paths lead to the proper config and executable.
+	And again, make sure that the paths lead to the proper config and executable. Replace `PASSWORD` with your Redis password.
 
 ####Non-docker start servers
 

+ 9 - 8
backend/index.js

@@ -206,15 +206,16 @@ async.waterfall([
 			app.listen(config.get("frontendPort"));
 			const rootDir = __dirname.substr(0, __dirname.lastIndexOf("backend")) + "frontend/build/";
 
+			app.use(express.static(rootDir, {
+				setHeaders: function(res, path) {
+					console.log(path);
+					if (path.indexOf('.html') !== -1) res.setHeader('Cache-Control', 'public, max-age=0');
+					else res.setHeader('Cache-Control', 'public, max-age=2628000');
+				}
+			}));
+
 			app.get("/*", (req, res) => {
-				const path = req.path;
-				fs.access(rootDir + path, function(err) {
-					if (!err) {
-						res.sendFile(rootDir + path);
-					} else {
-						res.sendFile(rootDir + "index.html");
-					}
-				});
+				res.sendFile(rootDir + "index.html");
 			});
 		}
 		if (lockdownB) return;

BIN
frontend/build/assets/notes-transparent.png


+ 2 - 3
frontend/build/index.tpl.html

@@ -33,14 +33,13 @@
 	<meta name='google' content='nositelinkssearchbox' />
 
 
-	<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css' rel='stylesheet' type='text/css'>
 	<link href='https://fonts.googleapis.com/css?family=Roboto:100,400' rel='stylesheet'>
 	<link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>
 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.2.3/css/bulma.min.css">
 	<link rel='stylesheet' href='/index.css'>
 	<script src='https://www.youtube.com/iframe_api'></script>
-	<script src='/vendor/jquery.min.js'></script>
-	<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.0/moment.min.js'></script>
+	<script type='text/javascript' src='/vendor/jquery.min.js'></script>
+	<script type='text/javascript' src='/vendor/moment.min.js'></script>
 	<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.8/socket.io.min.js'></script>
 	<script type='text/javascript' src='https://cdn.rawgit.com/atjonathan/lofig/master/dist/lofig.min.js'></script>
 	<script>

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
frontend/build/vendor/moment.min.js


+ 9 - 13
frontend/components/pages/Team.vue

@@ -85,52 +85,48 @@
 				<div class='card column is-6-desktop is-offset-3-desktop is-12-mobile'>
 					<header class='card-header'>
 						<p class='card-header-title'>
-							Adryd
+							Antonio
 						</p>
 					</header>
 					<div class='card-content'>
 						<div class='content'>
-							<span class="custom-tag pink">lead-designer</span>
+							<span class="custom-tag light-green">moderator</span>
 							<ul>
 								<li>
 									<b>Joined: </b>
-									April 21, 2017
+									November 11, 2015
 								</li>
 								<li>
 									<b>Email: </b>
-									<a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#097;&#100;&#114;&#121;&#100;&#064;&#109;&#117;&#115;&#097;&#114;&#101;&#046;&#099;&#111;&#109;">&#097;&#100;&#114;&#121;&#100;&#064;&#109;&#117;&#115;&#097;&#114;&#101;&#046;&#099;&#111;&#109;</a>
+									<a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#108;&#108;&#100;&#106;&#115;&#104;&#097;&#100;&#111;&#119;&#108;&#108;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">&#108;&#108;&#100;&#106;&#115;&#104;&#097;&#100;&#111;&#119;&#108;&#108;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;</a>
 								</li>
 							</ul>
 						</div>
 					</div>
 				</div>
 			</div>
-			<br>
+			<h3 class="center">Old/inactive members</h3>
+			<br />
 			<div class="columns">
 				<div class='card column is-6-desktop is-offset-3-desktop is-12-mobile'>
 					<header class='card-header'>
 						<p class='card-header-title'>
-							Antonio
+							Adryd
 						</p>
 					</header>
 					<div class='card-content'>
 						<div class='content'>
-							<span class="custom-tag light-green">moderator</span>
+							<span class="custom-tag pink">designer</span>
 							<ul>
 								<li>
 									<b>Joined: </b>
-									November 11, 2015
-								</li>
-								<li>
-									<b>Email: </b>
-									<a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#108;&#108;&#100;&#106;&#115;&#104;&#097;&#100;&#111;&#119;&#108;&#108;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;">&#108;&#108;&#100;&#106;&#115;&#104;&#097;&#100;&#111;&#119;&#108;&#108;&#064;&#103;&#109;&#097;&#105;&#108;&#046;&#099;&#111;&#109;</a>
+									April 21, 2017
 								</li>
 							</ul>
 						</div>
 					</div>
 				</div>
 			</div>
-			<h3 class="center">Old/inactive members</h3>
 			<br />
 			<div class="columns">
 				<div class='card column is-6-desktop is-offset-3-desktop is-12-mobile'>

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff