1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00
ipfs-boards/server/server.js
2015-11-14 00:16:57 +01:00

19 lines
423 B
JavaScript
Executable File

#!/usr/bin/env node
var ipfs = require('ipfs-api')('localhost','5001')
var BoardsAPI = require('../lib/boards-api.js')
var BoardsAPIHttp = require('../lib/boards-api-http.js')
var boards = new BoardsAPI(ipfs)
var server
boards.init(function(err){
if(err){
console.log(err)
} else {
server = BoardsAPIHttp(boards)
setInterval(boards.searchUsers.bind(boards),3 * 60 * 1000)
boards.searchUsers()
}
})