X-Git-Url: http://git.pjr.cc/?p=nodejs-repoproxy.git;a=blobdiff_plain;f=proxy.js;h=bbb75ce1839dc79c947d1977483654cd6856285b;hp=65cf72648fbd982254a7be8f432612dc7e209b38;hb=e03ba0bc17312d19afba035295d9b10049b10cb7;hpb=c3e6676d533e875b020d231075aac04e4b885677 diff --git a/proxy.js b/proxy.js index 65cf726..bbb75ce 100644 --- a/proxy.js +++ b/proxy.js @@ -2,15 +2,21 @@ var http = require("http"); var config = require("./lib/config.js"); var router = require("./lib/router.js"); var cache = require("./lib/cache.js"); +var maintain = require("./lib/maintain.js"); +var log = require("./lib/log.js"); +var debug = require("./lib/debug.js"); // first we load the config... -console.log("Loading configuration"); +log.info("Loading configuration"); config.loadConfig("./repos.conf"); +// start the maintenance timer +log.info("Starting cache maintenance timer"); +maintain.startTimer(); -console.log("Starting cache maintenance timer"); -cache.startTimer(); +// start the debug timer, if we should +debug.startDebugTimer(); // next we start our main request loop http.createServer(router.routeRequest).listen(global.repoproxy.listenPort);