forked from bdotdub/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.js
29 lines (20 loc) · 872 Bytes
/
server.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
config = require('./config/config');
var dashboard = require('./lib/dashboard');
var tracker = require('./lib/tracker');
var demo = require('./lib/demo');
dashboard.listen(config.dashboard_port, config.dashboard_address);
console.log("Dashboard listening on http://" + (config.dashboard_address || '*') + ":" + config.dashboard_port + ".");
// Tracker should listen on the same port as the dashboard
tracker.listen(dashboard);
console.log("Tracker listening on http://" + (config.dashboard_address || '*') + ":" + config.dashboard_port + "/tracking_pixel.gif.");
// If you want to have the tracking pixel listen on a different port
// (for instance in order to password-protect your dashboard) you can
// uncomment this
//
// tracker.listen(8000, "0.0.0.0");
// UDP tracking
//
// tracker.listenUdp(8000, "0.0.0.0");
if(config.demo_mode) {
demo.run(tracker);
}