Added a config option for listening interface
This commit is contained in:
1 parent
2b997e466a
commit
d93ba4445a
3 files changed
+6
-3
No files matched your search
+2
-2
@@ -124,5 +124,5 @@ else
|
|||||||
runTask(sessionId, deviceId, task, reqParams, response)
|
runTask(sessionId, deviceId, task, reqParams, response)
|
||||||
)
|
)
|
||||||
|
|
||||||
server.listen config.PORT
|
server.listen config.ACS_PORT, config.ACS_INTERFACE
|
||||||
console.log "Server listening on port #{config.PORT}"
|
console.log "Server listening on port #{config.ACS_PORT}"
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
exports.DATABASE_NAME = 'genie'
|
exports.DATABASE_NAME = 'genie'
|
||||||
exports.ACS_PORT = 7547 # same as AP Manager's port
|
exports.ACS_PORT = 7547 # same as AP Manager's port
|
||||||
|
exports.ACS_INTERFACE = null # null to listen to all interfaces
|
||||||
exports.API_PORT = 7557
|
exports.API_PORT = 7557
|
||||||
|
exports.API_INTERFACE = null # null to listen to all interfaces
|
||||||
exports.CACHE_DURATION = 60000
|
exports.CACHE_DURATION = 60000
|
||||||
exports.MONGODB_SOCKET = '/tmp/mongodb-27017.sock'
|
exports.MONGODB_SOCKET = '/tmp/mongodb-27017.sock'
|
||||||
exports.MEMCACHED_SOCKET = '/tmp/memcached.sock'
|
exports.MEMCACHED_SOCKET = '/tmp/memcached.sock'
|
||||||
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
|
config = require './config'
|
||||||
http = require 'http'
|
http = require 'http'
|
||||||
fs = require 'fs'
|
fs = require 'fs'
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ sendRequest = (serial, taskId, seq = 0) ->
|
|||||||
options = {
|
options = {
|
||||||
#host: '172.17.32.59',
|
#host: '172.17.32.59',
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
port: 1337,
|
port: config.ACS_PORT,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: headers,
|
headers: headers,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user