[Groonga-commit] droonga/droonga-http-server at afb48cc [master] Control pretty print by self

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Apr 28 14:41:57 JST 2014


YUKI Hiroshi	2014-04-28 14:41:57 +0900 (Mon, 28 Apr 2014)

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

  Message:
    Control pretty print by self

  Modified files:
    bin/droonga-http-server

  Modified: bin/droonga-http-server (+6 -0)
===================================================================
--- bin/droonga-http-server    2014-04-28 11:09:41 +0900 (f146beb)
+++ bin/droonga-http-server    2014-04-28 14:41:57 +0900 (30d2449)
@@ -94,6 +94,12 @@ if (options.pidFile) {
 var application = express();
 var server = http.createServer(application);
 
+application.set('json spaces', 1);
+var env = process.env.NODE_ENV || 'development';
+if (env == 'production') {
+  application.set('json spaces', -1); // disable pretty print!
+}
+
 var MemoryStore = session.MemoryStore;
 var sessionStore = new MemoryStore();
 
-------------- next part --------------
HTML����������������������������...
Download 



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