From 25f8baa2e483f0f4fb7cc8fbab3ce0026bb4059a Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 19:49:03 -0800 Subject: [PATCH 1/6] Remove commented out code --- app.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app.js b/app.js index 7a3d11d8..cf5382ad 100644 --- a/app.js +++ b/app.js @@ -35,10 +35,5 @@ app.get("/*", function (req, res) { // /party is the place where the homescreen will be app.use("/", indexRouter); app.use("/party", partyPageRouter); -// const PORT = process.env.PORT || 3001; -// app.listen(PORT, () => { -// console.log(`Mixing it up on port ${PORT}`); -// }); -// catch 404 and forward to error handler module.exports = app; From 427bbffd4f9fc1d500c882910208833d389c11da Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 19:55:16 -0800 Subject: [PATCH 2/6] Removing unused file --- public/javascripts/main.js | 78 -------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 public/javascripts/main.js diff --git a/public/javascripts/main.js b/public/javascripts/main.js deleted file mode 100644 index 3fde8d08..00000000 --- a/public/javascripts/main.js +++ /dev/null @@ -1,78 +0,0 @@ -// var express = require('express'); - -// const myDB = require('../../db/myMongoDb.js'); -// var CommentBox = React.createClass({ -// render: function() { -// return ( -//
-// Hello, world! I am a CommentBox. -//
-// ); -// } -// }); -// React.renderComponent( -// , -// document.getElementById('content') -// ); -// alert("hello"); -// var CommentBox = React.createClass({ -// render: function() { -// return ( -//
-// Hello, world! I am a CommentBox. -//
-// ); -// } -// }); -// React.renderComponent( -// , -// document.getElementById('content') -// ); -// console.log(myDB); - -// document.getElementById("content").innerHTML = "whaasfdasdfasdfadsfdsafdsafdsatever"; - -// cardContainer = document.getElementById('card-container'); -// const results = await myDB.getParties(); -// console.log(results); -// cardContainer.innerHTML = results; - -// let cardContainer; - -// let createTaskCard = (task) => { - -// let card = document.createElement('div'); -// card.className = 'card shadow cursor-pointer'; - -// let cardBody = document.createElement('div'); -// cardBody.className = 'card-body'; - -// let title = document.createElement('h5'); -// title.innerText = task.title; -// title.className = 'card-title'; - -// let color = document.createElement('div'); -// color.innerText = task.color; -// color.className = 'card-color'; - - -// cardBody.appendChild(title); -// cardBody.appendChild(color); -// card.appendChild(cardBody); -// cardContainer.appendChild(card); - -// } - -// let initListOfTasks = async() => { -// if (cardContainer) { -// document.getElementById('card-container').replaceWith(cardContainer); -// return; -// } - -// cardContainer = document.getElementById('card-container'); -// const results = await myDB.getParties(); -// cardContainer.innerHTML = results; -// // tasks.forEach((task) => { -// // createTaskCard(task); -// // }); -// }; \ No newline at end of file From 91c044d6e9f7fa74c4254c7b57f30610f28edc2f Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 19:59:16 -0800 Subject: [PATCH 3/6] Shouldn't have node modules pushed --- node_modules/.bin/acorn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn index c31c4304..12d947cb 100644 --- a/node_modules/.bin/acorn +++ b/node_modules/.bin/acorn @@ -1,3 +1,5 @@ +#node_modules should be added in git ignore and not pushed to the repo! + #!/bin/sh basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") From 349c74070011a21e0a0233fcb64a343750e30916 Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 20:02:24 -0800 Subject: [PATCH 4/6] CSS --- front/src/App.css | 1 + 1 file changed, 1 insertion(+) diff --git a/front/src/App.css b/front/src/App.css index 74b5e053..0bf6d460 100644 --- a/front/src/App.css +++ b/front/src/App.css @@ -1,3 +1,4 @@ +/** Better to put css files in a folder! **/ .App { text-align: center; } From 4210f67dba1d202f8e12738bb4c21feca735d1df Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 20:13:20 -0800 Subject: [PATCH 5/6] mongo --- db/myMongoDb.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/myMongoDb.js b/db/myMongoDb.js index c7f0dde4..f385e68b 100644 --- a/db/myMongoDb.js +++ b/db/myMongoDb.js @@ -1,6 +1,8 @@ var express = require("express"); var session = require("express-session"); const MongoClient = require("mongodb").MongoClient; + +//Best to not expose mongo credentials const mongoURL = "mongodb+srv://lpanavas:Password1@cluster0.b9bcp.mongodb.net/?retryWrites=true&w=majority"; From 1fae7e2583af3dda3c143927423ccaca07b92ca3 Mon Sep 17 00:00:00 2001 From: jennch Date: Tue, 3 Nov 2020 20:18:25 -0800 Subject: [PATCH 6/6] Removing commented out code --- routes/comments.js | 1 - 1 file changed, 1 deletion(-) diff --git a/routes/comments.js b/routes/comments.js index 6e95768a..1446cf65 100644 --- a/routes/comments.js +++ b/routes/comments.js @@ -6,7 +6,6 @@ const myDB = require('../db/myMongoDb.js') var ObjectId = require('mongodb').ObjectId; router.get('/:commentID', async (req, res) => { - // console.log('hello'); var id = req.params.commentID; var o_id = new ObjectId(id);