|
|
|
@ -6,13 +6,13 @@ console.log('current folder', process.cwd()) |
|
|
|
|
const folder = process.cwd() + '/temp_publish_docker'; |
|
|
|
|
|
|
|
|
|
(async () => { |
|
|
|
|
const host = 'ipfs.komputing.org' // ethdev berlin ipfs node |
|
|
|
|
const host = 'ipfs.remixproject.org' |
|
|
|
|
const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) |
|
|
|
|
try { |
|
|
|
|
let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) |
|
|
|
|
const hash = result.cid.toString() |
|
|
|
|
console.log('ipfs://' + hash) |
|
|
|
|
console.log('https://ipfsgw.komputing.org/ipfs/' + hash) |
|
|
|
|
console.log('https://ipfs.remixproject.org/ipfs/' + hash) |
|
|
|
|
console.log('https://gateway.ipfs.io/ipfs/' + hash) |
|
|
|
|
} catch (e) { |
|
|
|
|
console.log(e) |
|
|
|
|