Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: use spawnNode
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jan 27, 2017
1 parent 49c6579 commit 074e1f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 1 addition & 3 deletions examples/file-feed/complete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"react-router": "^3.0.1"
},
"scripts": {
"check-bundle": "test -f ../../../dist/index.js && npm run copy-bundle || echo \"js-ipfs dist file not found, go up two dirs and run 'npm run build' first\"",
"copy-bundle": "cp ../../../dist/index.js ./public/js/ipfs.js",
"start": "npm run check-bundle && react-scripts start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
Expand Down
8 changes: 2 additions & 6 deletions examples/file-feed/complete/src/browser-app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ class App extends Component {

// Initialize our DataStore, ie. start IPFS
dataStore = DataStore.init({
// Directory to which save IPFS data to
IpfsDataDir: '/ipfs/ipfd-2',
// IPFS dev server: webrtc-star-signalling.cloud.ipfs.team
// SignalServer: '188.166.203.82:20000',
// Localhost webrtc-star server
SignalServer: '127.0.0.1:9090'
path: '/ipfs/' + new Date().toString(),
signalAddr: '/dns4/star-signal.cloud.ipfs.team'
})

dataStore.on('error', (e) => console.error(e))
Expand Down
4 changes: 2 additions & 2 deletions examples/file-feed/complete/src/browser-app/DataStore.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Need to include this to make webpack happy
import { Buffer } from 'buffer/' // eslint-disable-line no-unused-vars
import EventEmitter from 'events'
import IPFS from './ipfs'
import spawnNode from '../util/spawn-node'
import OrbitDB from 'orbit-db'
import { readFileContents } from './read-file'

Expand All @@ -10,7 +10,7 @@ let instance
class DataStore extends EventEmitter {
constructor (options) {
super()
IPFS.create(options, (err, node) => {
spawnNode(options, (err, node) => {
if (err) {
console.log(err)
}
Expand Down

0 comments on commit 074e1f1

Please sign in to comment.