diff options
| -rw-r--r-- | README | 23 | ||||
| -rw-r--r-- | lib/bucky.js | 3 |
2 files changed, 21 insertions, 5 deletions
@@ -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() }) }, |
