Files: 7e467f6efa8f6320f4c92bbfbe6e905689e0b8eb / connect.js
471 bytesRaw
1 | var pull = require('pull-stream') |
2 | var Url = require('url') |
3 | var defined = require('defined') |
4 | |
5 | var Client = require('./client') |
6 | var HttpClient = require('./http/client') |
7 | |
8 | module.exports = connect |
9 | |
10 | function connect (services, config, options) { |
11 | options = defined(options, {}) |
12 | |
13 | var url = defined(options.url, '/') |
14 | var onConnect = options.onConnect |
15 | |
16 | var client = Client(services, config, options) |
17 | |
18 | var httpClient = HttpClient(client, options) |
19 | |
20 | return httpClient |
21 | } |
22 |
Built with git-ssb-web