Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ipfs gateway to ipfs.app.mesg.com #868

Merged
merged 2 commits into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ipfs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// DefaultEndpoint is endpoint used to access ipfs network.
const DefaultEndpoint = "https://ipfs.infura.io:5001/api/v0"
const DefaultEndpoint = "http://ipfs.app.mesg.com:5001/api/v0"

// DefaultClient is global client used for communication with ipfs network.
var DefaultClient = NewClient(DefaultEndpoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export default (

const uploadManifest = async (manifest: Manifest): Promise<string> => {
const ipfsClient = require('ipfs-http-client')
const IPFS = ipfsClient('ipfs.infura.io', '5001', {protocol: 'https'})
const IPFS = ipfsClient('ipfs.app.mesg.com', '5001', {protocol: 'http'})
const buffer = Buffer.from(JSON.stringify(manifest))
const res = await IPFS.add(buffer, {pin: false})
if (!res.length) {
throw new Error('Error while uploading manifest')
}
return res[0].hash
}
}