Created
December 28, 2019 12:20
-
-
Save vasa-develop/5f23e3917e7fa33375e897aacb4918f6 to your computer and use it in GitHub Desktop.
SimpleAsWater: Building a Chat Application using Libp2p
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
const Libp2p = require('libp2p') | |
const TCP = require('libp2p-tcp') | |
const defaultsDeep = require('@nodeutils/defaults-deep') | |
const DEFAULT_OPTS = { | |
modules: { | |
transport: [ | |
TCP | |
] | |
} | |
} | |
class P2PNode extends Libp2p { | |
constructor (opts) { | |
super(defaultsDeep(opts, DEFAULT_OPTS)) | |
} | |
} | |
module.exports = P2PNode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment