Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('ipfs', function(done){
console.log(server.port)
//'API.HTTPHeaders.Access-Control-Allow-Origin': '*'
var opt = {
'Addresses.API': '/ip4/127.0.0.1/tcp/5001',
'API': {
'HTTPHeaders': {
'Access-Control-Allow-Origin': [
'*'
]
}
}
}
console.log(opt)
ipfsd.disposableApi(opt,(err, ipfs) => {
ipfs.id(function (err, id) {
if(err) return console.log('Failed to start IPFS:',err)
console.log('Started IPFS Daemon')
//done()
})
})
})