mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-26 15:04:19 +01:00
restructuring cli
This commit is contained in:
parent
4698980063
commit
3905c23a68
@ -1,17 +1,19 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var cli = require('commander')
|
||||||
var ipfs = require('ipfs-api')('localhost','5001')
|
var ipfs = require('ipfs-api')('localhost','5001')
|
||||||
var BoardsAPI = require('../lib/boards-api.js')
|
var BoardsAPI = require('../lib/boards-api.js')
|
||||||
var BoardsAPIHttp = require('../lib/boards-api-http.js')
|
|
||||||
|
|
||||||
var boards = new BoardsAPI(ipfs)
|
var boards = new BoardsAPI(ipfs)
|
||||||
|
|
||||||
boards.init(function(err){
|
boards.init(function(err){
|
||||||
if(err){
|
if(err){
|
||||||
console.log(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",
|
"version": "0.1.0",
|
||||||
"description": "decentralized discussion board",
|
"description": "decentralized discussion board",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node server/server.js"
|
"serve": "gulp serve",
|
||||||
|
"build": "gulp"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"ipfs-board": "server/server.js"
|
"ipfs-board": "cli.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user