From c609f54f161901098cdcd3739b3591e486ceb238 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 4 Sep 2015 22:49:50 -0400 Subject: instructions --- README | 23 ++++++++++++++++++----- lib/bucky.js | 3 +++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README b/README index 1b2ad43..810d9d3 100644 --- a/README +++ b/README @@ -1,9 +1,22 @@ bucky ===== -1. npm install -2. install mysql (used for main database) -3. install mongodb (used for sessions) -4. copy .env-sample to .env and edit the values -5. run `node index` +# npm install +# brew install mysql (used for main database) +# brew install mongodb (used for sessions) +# set up the mysql database: +mysql -uroot +CREATE USER 'carbon'@'localhost' IDENTIFIED BY 'the_password'; +CREATE DATABASE bucky; +USE bucky; +GRANT ALL PRIVILEGES ON bucky.* TO 'carbon'@'localhost'; + +# copy .env-sample to .env and edit the values to correspond +# load up a copy of bucky + +mysql -u carbon -p bucky < bucky-20150903.sql + +# node index + +Server will be running at http://lvh.me:5000/ diff --git a/lib/bucky.js b/lib/bucky.js index 6022bb2..9ec28f4 100644 --- a/lib/bucky.js +++ b/lib/bucky.js @@ -13,7 +13,10 @@ var bucky = module.exports = { ensureCommentCountsForThreads: function (req, res, next){ var ids = res.threads.pluck("id") db.getCommentCounts(ids).then(function(counts){ + var lookup = {} console.log(counts) + counts.forEach(function(count){ + }) next() }) }, -- cgit v1.2.3-70-g09d2