You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'<h1> Your information is now encrypted in the interplanetary file system</h1>'
70
-
+'<h2>Your data is immortalized, and encrypted <a href="https://ipfs.io/ipfs/'+fileMultihash+'">here</a>. This is the Multi hash of your file:'+fileMultihash+'</h2>'
71
-
+'<h2> Only you have its password. If shared with this location, it gives access to your data. Share wisely.</h2>';
72
-
73
-
res.write(b)
74
-
// IPFS Core exposed components
75
-
// // - for booting up a node
76
-
//console.log('\nNode info on property init:', ipfsNode.init() )
77
-
//console.log('\nNode info on property preStart:', ipfsNode.preStart() )
78
-
//console.log('\nNode info on property start:', ipfsNode.start() )
79
-
//console.log('\nNode info on property stop:', ipfsNode.stop() )
80
-
console.log('Node info on property isOnline:',ipfsNode.isOnline())
81
-
// - interface-ipfs-core defined API
82
-
console.log('\nNode info on property version:',ipfsNode.version())
83
-
console.log('\nNode info on property id:',ipfsNode.id())
84
-
// console.log('\nNode info on property repo:', ipfsNode.repo )
85
-
// console.log('\nNode info on property bootstrap:', ipfsNode.bootstrap)
86
-
// console.log('\nNode info on property config:', ipfsNode.config )
87
-
// console.log('\nNode info on property block:', ipfsNode.block )
88
-
// console.log('\nNode info on property object:', ipfsNode.object )
89
-
// console.log('\nNode info on property dag:', ipfsNode.dag )
90
-
// console.log('\nNode info on property libp2p:', ipfsNode.libp2p )
91
-
// console.log('\nNode info on property swarm:', ipfsNode.swarm )
92
-
// console.log('\nNode info on property files:', ipfsNode.files )
93
-
// console.log('\nNode info on property bitswap:', ipfsNode.bitswap )
94
-
// console.log('\nNode info on property ping:', ipfsNode.ping)
95
-
// console.log('\nNode info on property pubsub:', ipfsNode.pubsub )
96
-
// console.log('\nNode info on property dht:', ipfsNode.dht )
47
+
// Upload to IPFS
48
+
// Create the File to add, a file consists of a path + content. More details on
'<h1> Your information is now encrypted in the interplanetary file system</h1>'+
64
+
'<h2>Your data is immortalized, and encrypted <a href="https://ipfs.io/ipfs/'+result[0].hash+'">here</a>. This is the Multi hash of your file:'+fileMultihash+'</h2>'+
65
+
'<h2> Only you have its password. If shared with this location, it gives access to your data. Share wisely.</h2>',
66
+
res.end.bind(res))
67
+
}
68
+
)
69
+
})
70
+
}else{
71
+
// Upload form
72
+
res.writeHead(200,{'Content-Type': 'text/html'});
73
+
res.write('<h1> Store and send encrypted content to anyone</h1>');
74
+
res.write('<h2>Encrypt and store in always-available, non-erasable peer-to-peer storage <br> Access and share with keys on www.</h2>');
res.write('<p>secure https server encrypting your info then uploading it to permanent peer to peer storage network (ipfs). <br> </br> Gives you a web adress (ipfs) and a password to decrypt your data</p>');
80
+
res.write('<p>Only you, and whomever you share the key with, has access</p>');
81
+
res.write('<p>* this service is used by https://dnavid.com through its API to upload personal DNA information while retaining control. <p>');
82
+
returnres.end();
83
+
}
84
+
}).on('listening',(err)=>{
85
+
if(err){
86
+
console.error(err)
87
+
process.exit(1)
107
88
}
108
-
)
109
-
}
110
-
else{
111
-
// Upload form
112
-
res.writeHead(200,{'Content-Type': 'text/html'});
113
-
res.write('<h1> Store and send encrypted content to anyone</h1>');
114
-
res.write('<h2>Encrypt and store in always-available, non-erasable peer-to-peer storage <br> Access and share with keys on www.</h2>');
res.write('<p>secure https server encrypting your info then uploading it to permanent peer to peer storage network (ipfs). <br> </br> Gives you a web adress (ipfs) and a password to decrypt your data</p>');
120
-
res.write('<p>Only you, and whomever you share the key with, has access</p>');
121
-
res.write('<p>* this service is used by https://dnavid.com through its API to upload personal DNA information while retaining control. <p>');
122
-
returnres.end();
123
-
}
124
-
}).listen(PORT,HOST);
125
89
90
+
console.log('HTTPS Server listening on %s:%s',HOST,PORT)
0 commit comments