Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
}
methods.exportFileFromArchive = ([srcKey, srcPath, dstPath]) => {
var srcArchive = datLibrary.getArchive(srcKey)
return pda.exportArchiveToFilesystem({
srcArchive,
srcPath,
dstPath,
overwriteExisting: true,
skipUndownloadedFiles: true
})
}
// start the server
server = jayson.server(methods).tcp()
server.listen(BKR_SERVER_PORT, 'localhost', err => {
if (err) console.error('Failed to create brk server', err)
debug('bkr server running on port %d', BKR_SERVER_PORT)
})
}
function startServer(argv) {
// jayson.server(rpcMethods).http().listen(RPCPORT);
var jsonParser = require('body-parser').json;
var jserver = jayson.server(rpcMethods)
var express = require('express')
var serveStatic = require('serve-static')
var app = express()
app.use(serveStatic('docs/', {
'index': ['index.html']
}))
app.use(jsonParser())
app.use(jserver.middleware())
showServerMsg(argv.pubhost||'host_ip')
app.listen(RPCPORT)
}