-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (29 loc) · 738 Bytes
/
Copy pathindex.js
File metadata and controls
35 lines (29 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
*
* Foxy - proxy with response moddin'
* https://github.com/shakyShane/foxy
*
*/
/**
* @param {String} target - a url such as http://www.bbc.co.uk or http://localhost:8181
* @param {Object} [userConfig]
* @returns {Foxy}
*/
function create(target, userConfig) {
/**
* Merge user config with defaults
* @type {Immutable.Map}
*/
var config = require("./lib/config")(target, userConfig);
/**
* Create a connect app
*/
var Foxy = require("./lib/server");
return new Foxy(config);
}
module.exports = function (target, userConfig) {
return create(target, userConfig).app;
};
module.exports.create = function (target, userConfig) {
return create(target, userConfig);
};