This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createNode (callback) { | |
PeerInfo.create((err, peerInfo) => { | |
if (err) { | |
return callback(err) | |
} | |
const peerIdStr = peerInfo.id.toB58String() | |
const address = `/dns4/star-signal.cloud.ipfs.team/wss/p2p-webrtc-star/ipfs/${peerIdStr}` | |
peerInfo.multiaddrs.add(address) | |
const node = new MyBundle(peerInfo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import libp2p from 'libp2p' | |
import PeerInfo from 'peer-info' | |
import WebRTCStar from 'libp2p-webrtc-star' | |
import KadDHT from 'libp2p-kad-dht' | |
import CID from 'cids' | |
class MyBundle extends libp2p { | |
constructor (peerInfo) { | |
const wstar = new WebRTCStar() | |
const modules = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x8cbc58399A66840bA65ec7875342C7A64dc3eE44 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xb09c059533C35A0a0acb82CdE4b7BeeA25473c81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xb09c059533C35A0a0acb82CdE4b7BeeA25473c81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
NewerOlder