Example #1
0
 cliCommands[datCommand.command].call(dat, datCommand.options, function(err, message) {
   if (err) {
     dat.close()
     return console.error(err.message)
   }
   if (typeof message === 'object') message = JSON.stringify(message)
   if (!opts.argv.quiet && message) stdout.write(message.toString() + EOL)
   if (datCommand.command !== 'serve' || datCommand.command !== 'listen') close()
 })
Example #2
0
 cliCommands[datCommand.command].call(dat, datCommand.options, function(err, message) {
   if (err) {
     dat.close()
     return console.error(err.message)
   }
   if (typeof message === 'object') message = JSON.stringify(message)
   if (!argv.quiet && message) stdout.write(message.toString() + EOL)
   var persist = ['serve', 'listen']
   if (persist.indexOf(datCommand.command) === -1) close()
 })