Api / JavaScript /

connect( [options] )

Connect with a listening Node.

Arguments

[options] Object

Returns

A new Node instance.

Examples

Browser using ES6

import dop from 'dop'
const node_server = dop.connect() // WebSockets by default

Equivalent to:

import dop from 'dop'
const node_server = dop.connect({ url:'ws://localhost:4444' })

See also