-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
39 lines (24 loc) · 913 Bytes
/
app.js
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
var express = require('express');
var proxy = require('./proxy');
var serverModifier = require('./server-modification');
require('./instrument/timeout');
var app = express();
app.use(express.static(__dirname + '/public'));
var server = app.listen(3000, function(req, res) {
// instrumentServerFiles('./files/server/');
serverModifier.instrument('./files/server/');
// console.log(setTimeout);
// console.log(__setTimeout);
// setTimeout(temp, 2000);
var host = server.address().address;
var port = server.address().port;
console.log('example app listening at http://%s:%s', host, port);
});
function temp() {
console.log('to ******************************************');
}
app.get('/', function(req, res) {
//res.send('hi');
proxy.instrumentResponse(req, res);
});
//setTimeout(function() {console.log('to ******************************************');}, 0);