1 | # FlexHosts
|
2 |
|
3 | > Support Mac OS X, Windows, Linux
|
4 |
|
5 | ```
|
6 | var flexHosts = require("flex-hosts");
|
7 |
|
8 | flexHosts(hostsMap, [dir,] function (err, hosts) {
|
9 | ...
|
10 | });
|
11 | ```
|
12 |
|
13 | ## Arguments
|
14 |
|
15 | ### hostsMap
|
16 |
|
17 | ```
|
18 | {
|
19 | "127.0.0.1": [
|
20 | "g.cdn.cn",
|
21 | "a.cdn.cn"
|
22 | ],
|
23 | "127.0.0.2": "t.cdn.cn o.cdn.cn"
|
24 | }
|
25 | ```
|
26 |
|
27 | * The value relevant to key could be Array or String.
|
28 |
|
29 | ### [dir]
|
30 |
|
31 | The DIR where puts the hostsMap file
|