diff --git a/lib/server.js b/lib/server.js index 3e2434d..19e8c4e 100644 --- a/lib/server.js +++ b/lib/server.js @@ -23,6 +23,8 @@ exports.start = function(callback) { var server = http.createServer(function(req, res) { var requestUrl = url.parse(req.url).pathname; + logger.log('info', '%s requested: %s', req.connection.remoteAddress, requestUrl); + if (requestUrl in urlMapping) { var file = urlMapping[requestUrl]; @@ -40,7 +42,8 @@ exports.start = function(callback) { server.listen(config.site.port, config.site.ip); // I don't like this. But it works, I think. - exports.io = (io = io.listen(server)); + io = io.listen(server); + exports.io = io; // Since everything is loaded, do some final prep work. logger.log('info', 'Started on %s:%d', config.site.ip, config.site.port);