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
|
||||
options = merge({
|
||||
'host': 'localhost',
|
||||
'port': 2775,
|
||||
'timeout': 30000 // 30 sec
|
||||
}, options || {});
|
||||
@@ -168,7 +167,11 @@ function server(options, callback) {
|
||||
callback(null, returnObj);
|
||||
}).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
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
"url": "https://github.com/larvit/larvitsmpp",
|
||||
"type": "git"
|
||||
},
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"readmeFilename": "README.md",
|
||||
"readme": "larvitsmpp",
|
||||
"bugs": {
|
||||
|
||||
Reference in New Issue
Block a user