2015-11-11 09:18:36 +01:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
var ipfs = require('ipfs-api')('localhost','5001')
|
|
|
|
var BoardsAPI = require('../lib/boards-api.js')
|
2015-11-14 00:16:57 +01:00
|
|
|
var BoardsAPIHttp = require('../lib/boards-api-http.js')
|
2015-11-11 09:18:36 +01:00
|
|
|
|
|
|
|
var boards = new BoardsAPI(ipfs)
|
2015-11-14 00:16:57 +01:00
|
|
|
var server
|
2015-11-11 09:18:36 +01:00
|
|
|
|
|
|
|
boards.init(function(err){
|
|
|
|
if(err){
|
|
|
|
console.log(err)
|
|
|
|
} else {
|
2015-11-14 00:16:57 +01:00
|
|
|
server = BoardsAPIHttp(boards)
|
|
|
|
setInterval(boards.searchUsers.bind(boards),3 * 60 * 1000)
|
|
|
|
boards.searchUsers()
|
2015-11-11 09:18:36 +01:00
|
|
|
}
|
|
|
|
})
|