[Groonga-commit] groonga/express-kotoumi [master] Define default host name as a constant variable

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 18 17:33:13 JST 2013


YUKI Hiroshi	2013-01-18 17:33:13 +0900 (Fri, 18 Jan 2013)

  New Revision: 20e671f92ac5b19b37005137c74f339f4d16c012
  https://github.com/groonga/express-kotoumi/commit/20e671f92ac5b19b37005137c74f339f4d16c012

  Log:
    Define default host name as a constant variable

  Modified files:
    lib/backend-adaptor.js

  Modified: lib/backend-adaptor.js (+2 -1)
===================================================================
--- lib/backend-adaptor.js    2013-01-18 17:25:51 +0900 (b2c6aa5)
+++ lib/backend-adaptor.js    2013-01-18 17:33:13 +0900 (d6e8712)
@@ -26,6 +26,7 @@ var fluent = require('fluent-logger');
 var DEFAULT_FLUENT_TAG  = 'groonga';
 var DEFAULT_FLUENT_HOST = 'localhost';
 var DEFAULT_FLUENT_PORT = 24224;
+var DEFAULT_HOST_NAME   = 'localhost';
 var DEFAULT_LISTEN_PORT = 10030;
 
 function Connection(params) {
@@ -51,7 +52,7 @@ Connection.prototype._initSender = function() {
 };
 
 Connection.prototype._initReceiver = function() {
-  this.hostName = this._params.hostName || 'localhost';
+  this.hostName = this._params.hostName || DEFAULT_HOST_NAME;
   this.listenPort = this._params.listenPort || DEFAULT_LISTEN_PORT;
   this._receiver = this._params.receiver || socketIo.listen(this.listenPort);
 
-------------- next part --------------
HTML����������������������������...
Download 



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