From 31daf8ede3e8903250411147b88675fcfc52d10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Ingi=20Mikaelsson?= Date: Tue, 17 Dec 2013 13:09:51 +0000 Subject: [PATCH] even more readability --- server.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index 924e25aa..462f6b83 100644 --- a/server.js +++ b/server.js @@ -1,6 +1,6 @@ var express = require('express'), app = module.exports = express(), - config = require('./config'), + config = require('./config'), fileModule = require('file'), cache = require('./lib/cache'), cors = require('./lib/cors'), @@ -35,9 +35,9 @@ app.use(cache()); * Set up endpoints */ fileModule.walkSync('./endpoints', function iterateEndpoints(dirPath, dirs, endpoints) { - if (endpoints && dirPath.indexOf("/test") < 0) endpoints.forEach( requireEndpoint ); + if (endpoints && dirPath.indexOf('/test') < 0) endpoints.forEach(requireEndpoint); - function requireEndpoint (endpoint) { + function requireEndpoint(endpoint) { if (endpoint.indexOf('.DS_Store') === -1) require('./' + dirPath + '/' + endpoint); } }); @@ -45,10 +45,10 @@ fileModule.walkSync('./endpoints', function iterateEndpoints(dirPath, dirs, endp /** * Start the server */ -app.listen(config.port,function() { +app.listen(config.port, function () { app.emit('ready'); }); -app.on('ready',function() { +app.on('ready', function () { if (!config.testing) console.log('Server running at port: ' + config.port); }); \ No newline at end of file