Added option to let server listen to any host
This commit is contained in:
+5
-2
@@ -151,7 +151,6 @@ function server(options, callback) {
|
|||||||
|
|
||||||
// Set default options
|
// Set default options
|
||||||
options = merge({
|
options = merge({
|
||||||
'host': 'localhost',
|
|
||||||
'port': 2775,
|
'port': 2775,
|
||||||
'timeout': 30000 // 30 sec
|
'timeout': 30000 // 30 sec
|
||||||
}, options || {});
|
}, options || {});
|
||||||
@@ -168,7 +167,11 @@ function server(options, callback) {
|
|||||||
callback(null, returnObj);
|
callback(null, returnObj);
|
||||||
}).listen(options.port, options.host);
|
}).listen(options.port, options.host);
|
||||||
|
|
||||||
log.info('larvitsmpp: lib/server.js: server() - Up and running at ' + options.host + ':' + options.port);
|
if (options.host !== undefined) {
|
||||||
|
log.info('larvitsmpp: lib/server.js: server() - Up and listening at ' + options.host + ':' + options.port);
|
||||||
|
} else {
|
||||||
|
log.info('larvitsmpp: lib/server.js: server() - Up and listening at *:' + options.port);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose some functions
|
// Expose some functions
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
"url": "https://github.com/larvit/larvitsmpp",
|
"url": "https://github.com/larvit/larvitsmpp",
|
||||||
"type": "git"
|
"type": "git"
|
||||||
},
|
},
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"readme": "larvitsmpp",
|
"readme": "larvitsmpp",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
Reference in New Issue
Block a user