Skip to content

Commit

Permalink
fix: pick a non used port
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Feb 23, 2018
1 parent fbca3e0 commit b70f5ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ f.spawn(function (err, ipfsd) {

const IPFSFactory = require('ipfsd-ctl')

const port = 9999
const port = 9090
const server = IPFSFactory.createServer(port)
const f = IPFSFactory.create({ remote: true, port: port })

Expand Down Expand Up @@ -101,7 +101,7 @@ Install one or both of the following modules:

- `options` - optional object with:
- `remote` bool - use remote endpoint to spawn the nodes.
- `port` number - remote endpoint point. Defaults to 9999.
- `port` number - remote endpoint point. Defaults to 43134.
- `exec` - IPFS executable path. `ipfsd-ctl` will attempt to locate it by default. If you desire to spawn js-ipfs instances in the same process, pass the ref to the module instead (e.g `exec: require('ipfs')`)
- `type` - the daemon type, see below the options
- `go` - spawn go-ipfs daemon
Expand Down
2 changes: 1 addition & 1 deletion src/endpoint/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const routes = require('./routes')

class Server {
constructor (options) {
options = options || { port: 9999 }
options = options || { port: 43134 }

this.server = null
this.port = options.port
Expand Down
2 changes: 1 addition & 1 deletion src/factory-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FactoryClient {
constructor (options) {
options = options || {}
if (!options.host) { options.host = 'localhost' }
if (!options.port) { options.port = 9999 }
if (!options.port) { options.port = 43134 }
if (typeof options.host === 'number') {
options.port = options.host
options.host = 'localhost'
Expand Down

0 comments on commit b70f5ac

Please sign in to comment.