Skip to content

Commit

Permalink
fix protocol, host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 25, 2018
1 parent 9f72248 commit e23be39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import API from 'ipfs-api'
import {sortBy} from 'lodash-es'
import {join} from 'path'

const host = window.location.hostname
const port = window.location.port
const host = (process.env.NODE_ENV !== 'production') ? 'localhost' : window.location.hostname
const port = (process.env.NODE_ENV !== 'production') ? '5001' : window.location.port

const localApi = new API(host, port, {
protocol: window.location.protocol
protocol: window.location.protocol.slice(0, -1)
})

// -- Public Interface
Expand Down

0 comments on commit e23be39

Please sign in to comment.