mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-25 14:54:19 +01:00
restructuring cli
This commit is contained in:
parent
4698980063
commit
3905c23a68
@ -1,17 +1,19 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var cli = require('commander')
|
||||
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)
|
||||
|
||||
boards.init(function(err){
|
||||
if(err){
|
||||
console.log(err)
|
||||
} else {
|
||||
// BoardsAPIHttp(boards)
|
||||
// setInterval(boards.searchUsers.bind(boards),3 * 60 * 1000)
|
||||
// boards.searchUsers()
|
||||
}
|
||||
})
|
||||
|
||||
cli
|
||||
.version(require('package.json').version)
|
||||
.description('command line interface for IPFS boards')
|
||||
|
||||
cli.parse(process.argv)
|
@ -3,10 +3,11 @@
|
||||
"version": "0.1.0",
|
||||
"description": "decentralized discussion board",
|
||||
"scripts": {
|
||||
"start": "node server/server.js"
|
||||
"serve": "gulp serve",
|
||||
"build": "gulp"
|
||||
},
|
||||
"bin": {
|
||||
"ipfs-board": "server/server.js"
|
||||
"ipfs-board": "cli.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user