Repository navigation
Expand file tree
/
Copy pathtests.multi.js
More file actions
103 lines (94 loc) · 2.63 KB
/
Copy pathtests.multi.js
File metadata and controls
103 lines (94 loc) · 2.63 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"use strict";
var connect = require("connect");
var utils = require("../../lib/server/utils");
var Immutable = require("immutable");
function getApp (bs, options) {
var html = "<!doctype html><html lang=\"en-US\"><head><meta charset=\"UTF-8\"><title>Browsersync</title></head><body>BS</body></html>";
var app = connect();
app.use("/", function (req, res) {
res.setHeader("content-type", "text/html");
res.end(html.replace("BS", bs.getOption("snippet")));
});
var appserver = utils.getServer(app, options);
return appserver;
}
module.exports = {
"Proxy Test Laravel App": {
bsConfig: {
proxy: "http://homestead.app:8000/",
open: false,
logLevel: "silent"
}
},
"Proxy Test Wordpress": {
bsConfig: {
proxy: "http://wordpress.dev",
open: false,
logLevel: "silent"
}
},
"Proxy Test Localhost": {
bsConfig: {
proxy: "localhost",
open: false,
logLevel: "silent"
}
},
"Secure Proxy": {
bsConfig: {
proxy: "https://grenade.static:8890",
open: false,
logLevel: "silent"
}
},
"Server": {
bsConfig: {
server: "./test/fixtures",
open: false,
logLevel: "silent"
}
},
"Secure Server": {
bsConfig: {
server: "./test/fixtures",
open: false,
logLevel: "silent",
https: true
}
},
"Snippet": {
bsConfig: {
logLevel: "silent"
},
before: function (bs, cb) {
var app = getApp(bs, Immutable.Map({scheme: "http"}));
app.server.listen();
process.env["BS_BASE"] = "http://localhost:" + app.server.address().port;
cb();
}
},
"Secure Snippet on Insecure Website": {
bsConfig: {
logLevel: "silent",
https: true
},
before: function (bs, cb) {
var app = getApp(bs, Immutable.Map({scheme: "http"}));
app.server.listen();
process.env["BS_BASE"] = "http://localhost:" + app.server.address().port;
cb();
}
},
"Secure Snippet on Secure Website": {
bsConfig: {
logLevel: "silent",
https: true
},
before: function (bs, cb) {
var app = getApp(bs, Immutable.Map({scheme: "https"}));
app.server.listen();
process.env["BS_BASE"] = "https://localhost:" + app.server.address().port;
cb();
}
}
};