1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00

added moment dep

This commit is contained in:
Enrico Fasoli 2015-11-11 15:51:07 +01:00
parent 5b1583b4ed
commit 5b6cd4832d
3 changed files with 12 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
example_user/ example_user/
server/node_modules/ node_modules/
test/ test/

View File

@ -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){ function asObj(str,done){
var obj var obj
@ -84,7 +90,6 @@ BoardsAPI.prototype.isUser = function(s){
var ss = s.split('/') var ss = s.split('/')
var addr = ss[ss.length-1] var addr = ss[ss.length-1]
// Try to see if they run IPFS Boards // Try to see if they run IPFS Boards
console.log('Is',addr,'a user?')
this.resolveIPNS(addr,(err,url) => { this.resolveIPNS(addr,(err,url) => {
if(err) return console.log('Cannot resolve',addr,':',err) if(err) return console.log('Cannot resolve',addr,':',err)
this.isUserProfile(url,isit => { this.isUserProfile(url,isit => {

View File

@ -3,10 +3,10 @@
"version": "0.1.0", "version": "0.1.0",
"description": "decentralized discussion board", "description": "decentralized discussion board",
"scripts": { "scripts": {
"start": "node cli/server.js" "start": "node server/server.js"
}, },
"bin": { "bin": {
"ipfs-board": "cli/server.js" "ipfs-board": "server/server.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -21,6 +21,7 @@
"dependencies": { "dependencies": {
"commander": "^2.9.0", "commander": "^2.9.0",
"express": "^4.13.3", "express": "^4.13.3",
"ipfs-api": "^2.6.2" "ipfs-api": "^2.6.2",
"moment": "^2.10.6"
} }
} }