[Groonga-commit] droonga/droonga-http-server at 8d24ffb [master] Reduce indentations

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 21 19:50:24 JST 2014


YUKI Hiroshi	2014-04-21 19:50:24 +0900 (Mon, 21 Apr 2014)

  New Revision: 8d24ffbb1228e7b0972bdf1bb6a6ca29780ef130
  https://github.com/droonga/droonga-http-server/commit/8d24ffbb1228e7b0972bdf1bb6a6ca29780ef130

  Message:
    Reduce indentations

  Modified files:
    bin/droonga-http-server

  Modified: bin/droonga-http-server (+30 -31)
===================================================================
--- bin/droonga-http-server    2014-04-21 19:49:44 +0900 (bf61234)
+++ bin/droonga-http-server    2014-04-21 19:50:24 +0900 (842d2e4)
@@ -41,38 +41,37 @@ var server = http.createServer(application);
 var MemoryStore = session.MemoryStore;
 var sessionStore = new MemoryStore();
 
-
-  if (options.enableLogging) {
-    application.use(express.logger());
-  }
-  application.use(cookieParser('secret key'));
-  application.use(session({
-    secret: 'secret key',
-    store:  sessionStore
-  }));
-  application.use(responseTime());
-  if (options.cacheSize > 0) {
-    var cacheMiddlewareRules = [
-      { regex: /./ }
-    ];
-    if (droonga.Cache) {
-      var cache = new droonga.Cache({
-        size: options.cacheSize,
-      });
-      application.use("/cache/statistics",
-                      droonga.middleware.cacheStatistics(cache));
-      application.use(droonga.middleware.cache(cache, {
-        rules: cacheMiddlewareRules
-      }));
-    } else if (droonga.cache) {
-      // TODO: Remove me when express-droonga 1.0.2 is released and
-      // droonga-http-server requires express-droonga 1.0.2 or later.
-      application.use(droonga.cache({
-        size: options.cacheSize,
-        rules: cacheMiddlewareRules,
-      }));
-    }
+if (options.enableLogging) {
+  application.use(express.logger());
+}
+application.use(cookieParser('secret key'));
+application.use(session({
+  secret: 'secret key',
+  store:  sessionStore
+}));
+application.use(responseTime());
+if (options.cacheSize > 0) {
+  var cacheMiddlewareRules = [
+    { regex: /./ }
+  ];
+  if (droonga.Cache) {
+    var cache = new droonga.Cache({
+      size: options.cacheSize,
+    });
+    application.use("/cache/statistics",
+                    droonga.middleware.cacheStatistics(cache));
+    application.use(droonga.middleware.cache(cache, {
+      rules: cacheMiddlewareRules
+    }));
+  } else if (droonga.cache) {
+    // TODO: Remove me when express-droonga 1.0.2 is released and
+    // droonga-http-server requires express-droonga 1.0.2 or later.
+    application.use(droonga.cache({
+      size: options.cacheSize,
+      rules: cacheMiddlewareRules,
+    }));
   }
+}
 
 application.droonga({
   prefix: '',
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index