API server for libp2p-daemon instances
$ npm i @libp2p/daemon-server
The specs for the daemon are currently housed in the go implementation. You can read them at libp2p/go-libp2p-daemon
import { createServer } from '@libp2p/daemon-server'
import { createLibp2p } from 'libp2p'
import { multiaddr } from '@multiformats/multiaddr'
const libp2p = await createLibp2p({
// ..config
})
const multiaddr = multiaddr('/ip4/0.0.0.0/tcp/0')
const server = await createServer(multiaddr, libp2p)
await server.start()
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.