diff --git a/.gitignore b/.gitignore index 83cc904..ef54795 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ example_user/ -server/node_modules/ +node_modules/ test/ diff --git a/lib/boards-api.js b/lib/boards-api.js index 6e03640..a5cc9f8 100644 --- a/lib/boards-api.js +++ b/lib/boards-api.js @@ -1,4 +1,10 @@ -// Write an API to aggregate data without duplication and making accessing content easy. Use the IPFS http api +/* +This file contains the IPFS Boards API. It's a simple abstraction over the +js-ipfs-api that also provides an additional level of caching for this +particular application. Let's hope it turns out decent +*/ + +var moment = require('moment') function asObj(str,done){ var obj @@ -84,7 +90,6 @@ BoardsAPI.prototype.isUser = function(s){ var ss = s.split('/') var addr = ss[ss.length-1] // Try to see if they run IPFS Boards - console.log('Is',addr,'a user?') this.resolveIPNS(addr,(err,url) => { if(err) return console.log('Cannot resolve',addr,':',err) this.isUserProfile(url,isit => { diff --git a/package.json b/package.json index a80a42e..f3f3bd0 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "version": "0.1.0", "description": "decentralized discussion board", "scripts": { - "start": "node cli/server.js" + "start": "node server/server.js" }, "bin": { - "ipfs-board": "cli/server.js" + "ipfs-board": "server/server.js" }, "repository": { "type": "git", @@ -21,6 +21,7 @@ "dependencies": { "commander": "^2.9.0", "express": "^4.13.3", - "ipfs-api": "^2.6.2" + "ipfs-api": "^2.6.2", + "moment": "^2.10.6" } }