You are here

function nodejs_get_config in Node.js integration 6

Same name and namespace in other branches
  1. 8 nodejs.module \nodejs_get_config()
  2. 7 nodejs.module \nodejs_get_config()

Get nodejs server config.

Return value

array

3 calls to nodejs_get_config()
Nodejs::initConfig in ./nodejs.module
nodejs_auth_check in ./nodejs.module
Checks the given key to see if it matches a valid session.
nodejs_init in ./nodejs.module
Implements hook_init().

File

./nodejs.module, line 501

Code

function nodejs_get_config() {
  $defaults = array(
    'scheme' => variable_get('nodejs_server_scheme', 'http'),
    'secure' => variable_get('nodejs_server_scheme', 'http') == 'https' ? 1 : 0,
    'host' => variable_get('nodejs_config_host', 'localhost'),
    'port' => variable_get('nodejs_config_port', '8080'),
    'resource' => variable_get('nodejs_config_resource', '/socket.io'),
    'authToken' => md5(session_id()),
    'serviceKey' => variable_get('nodejs_config_serviceKey', ''),
  );
  return variable_get('nodejs_config', array()) + $defaults;
}