repo changes
[nodejs-repoproxy.git] / proxy.js
1 var http = require("http");
2 var config = require("./lib/config.js");
3 var router = require("./lib/router.js");
4 var cache = require("./lib/cache.js");
5 var maintain = require("./lib/maintain.js");
6 var log = require("./lib/log.js");
7 var debug = require("./lib/debug.js");
8
9
10 // first we load the config...
11 log.info("Loading configuration");
12 config.loadConfig("./repos.conf");
13
14 // start the maintenance timer
15 log.info("Starting cache maintenance timer");
16 maintain.startTimer();
17
18 // start the debug timer, if we should
19 debug.startDebugTimer();
20
21 // next we start our main request loop
22 http.createServer(router.routeRequest).listen(global.repoproxy.listenPort);