diff --git a/nodejs.module b/nodejs.module
old mode 100644
new mode 100755
index cda3668..35003c0
--- a/nodejs.module
+++ b/nodejs.module
@@ -85,7 +85,18 @@ function nodejs_get_js_handlers() {
  */
 function nodejs_menu() {
   return array(
+  // Administration pages.
     'admin/config/nodejs' => array(
+      'title' => 'Nodejs',
+      'description' => 'Configure nodejs module.',
+      'position' => 'left',
+      'weight' => -20,
+      'page callback' => 'system_admin_menu_block_page',
+      'access arguments' => array('access administration pages'),
+      'file' => 'system.admin.inc',
+      'file path' => drupal_get_path('module', 'system'),
+    ),
+    'admin/config/nodejs/config' => array(
       'title' => 'Node.js configuration',
       'description' => 'Adjust node.js settings.',
       'page callback' => 'drupal_get_form',
@@ -93,6 +104,7 @@ function nodejs_menu() {
       'access arguments' => array('administer site configuration'),
       'file' => 'nodejs.admin.inc',
     ),
+
     'nodejs/auth/%' => array(
       'title' => 'Who goes there?',
       'page callback' => 'nodejs_auth_check',
diff --git a/nodejs_config/nodejs_config.info b/nodejs_config/nodejs_config.info
new file mode 100755
index 0000000..cd26ece
--- /dev/null
+++ b/nodejs_config/nodejs_config.info
@@ -0,0 +1,6 @@
+name = Nodejs Config
+description = Helps to configure the nodejs module.
+package = Nodejs
+version = VERSION
+core = 7.x
+dependencies[] = nodejs
diff --git a/nodejs_config/nodejs_config.module b/nodejs_config/nodejs_config.module
new file mode 100755
index 0000000..03bb747
--- /dev/null
+++ b/nodejs_config/nodejs_config.module
@@ -0,0 +1,166 @@
+<?php
+
+/**
+ * this module help to configure the nodejs.config.js file
+ * writen by @afeijo www.drupal.org/user/165811
+*/
+
+/**
+ * Implements hook_menu().
+ */
+function nodejs_config_menu() {
+  return array(
+    'admin/config/nodejs/js' => array(
+      'title' => 'nodejs.config.js configuration',
+      'description' => 'Adjust nodejs.config.js file.',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('nodejs_config_form'),
+      'access arguments' => array('administer site configuration'),
+    ),
+  );
+}
+
+function nodejs_config_form() {
+  $form = array();
+  
+  $scheme = variable_get('nodejs_server_scheme', 'http');
+  
+  $form['config'] = array(
+    '#type' => 'fieldset',
+    '#title' => 'Settings',
+  );
+  $form['config']['nodejs_config_host'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Host',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_host', 'localhost'),
+  );
+  $form['config']['nodejs_config_port'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Port',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_port', '8080'),
+  );
+  // the next 2 fields show only if the scheme is configured as https at admin/nodejs/config
+  $form['config']['nodejs_config_key'] = array(
+    '#type' => $scheme == 'https' ? 'textfield' : 'hidden',
+    '#title' => 'Key',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_key', '/path/to/key/file'),
+  );  
+  $form['config']['nodejs_config_cert'] = array(
+    '#type' => $scheme == 'https' ? 'textfield' : 'hidden',
+    '#title' => 'Cert',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_cert', '/path/to/cert/file'),
+  );
+  $form['config']['nodejs_config_resource'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Resource',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_resource', '/node.js/realtime'),
+  );
+  $form['config']['nodejs_config_publishUrl'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Publish URL',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_publishUrl', '/nodejs/publish'),
+  );
+  $form['config']['nodejs_config_serviceKey'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Service Key',
+    '#default_value' => variable_get('nodejs_config_serviceKey', ''),
+  );
+
+  $form['config']['backend'] = array(
+    '#type' => 'fieldset',
+    '#title' => 'Backend',
+  );
+  $form['config']['backend']['nodejs_config_backend_host'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Host',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_backend_host', 'localhost'),
+  );
+  $form['config']['backend']['nodejs_config_backend_port'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Port',
+    '#required' => true,
+    '#default_value' => variable_get('nodejs_config_backend_port', '80'),
+  );
+  $form['config']['backend']['nodejs_config_backend_authPath'] = array(
+    '#type' => 'textfield',
+    '#title' => 'Auth Path',
+    '#default_value' => variable_get('nodejs_config_backend_authPath', '/nodejs/auth/'),
+  );
+  $form['#submit'][] = 'nodejs_config_form_submit';
+
+  return system_settings_form($form);
+}
+function nodejs_config_form_submit($form, &$form_state) {
+  $values = $form_state['values'];
+  $path = drupal_get_path('module', 'nodejs');
+  $file = $path .'/nodejs.config.js';
+  $array = array(
+    'scheme' => variable_get('nodejs_server_scheme', 'http'),
+    'host' => $values['nodejs_config_host'],
+    'port' => $values['nodejs_config_port'],
+    'key' => $values['nodejs_config_key'],
+    'cert' => $values['nodejs_config_cert'],
+    'resource' => $values['nodejs_config_resource'],
+    'publishUrl' => $values['nodejs_config_publishUrl'],
+    'serviceKey' => $values['nodejs_config_serviceKey'],
+    'backend' => array(
+      'port' => $values['nodejs_config_backend_port'],
+      'host' => $values['nodejs_config_backend_host'],
+      'authPath' => $values['nodejs_config_backend_authPath'],
+    ),
+  );
+  $output = arrayToJSObject($array, 'backendSettings');
+
+  $js = @fopen($file, 'w');
+  if ($js === false) {
+    drupal_set_message(t('It was not possible to write the bellow lines to <b>!file</b>, you need to do it manually.', array('!file' => $file)));
+    drupal_set_message('<pre>' .$output .'</pre>');
+  } else {
+    fwrite($js, $output);
+    fclose($js);
+  }
+}
+
+function arrayToJSObject($array, $varname, $sub = 0 ) {
+  $sep = "  ";
+  $indent = str_repeat($sep, $sub);
+  $jsarray = $sub ? $varname . "{\n" : $varname . " = {\n";
+  $indent .= $sep;
+  //$varname = str_repeat("\t-", $sub+1) ."$varname";
+  reset ($array);
+  
+  // Loop through each element of the array
+  while (list($key, $value) = each($array)) {
+    $jskey = "$indent'" . $key . "' : ";
+   
+    if (is_array($value)) {
+        // Multi Dimensional Array
+        $temp[] = arrayToJSObject($value, $jskey, $sub+1);
+    } else {
+        if (is_numeric($value)) {
+            $jskey .= "$value";
+        } elseif (is_bool($value)) {
+            $jskey .= ($value ? 'true' : 'false') . "";
+        } elseif ($value === NULL) {
+            $jskey .= "null";
+        } else {
+            static $pattern = array("\\", "'", "\r", "\n");
+            static $replace = array('\\', '\\\'', '\r', '\n');
+            $jskey .= "'" . str_replace($pattern, $replace, $value) . "'";
+        }
+        $temp[] = $jskey;
+    }
+  }
+  $jsarray .= implode(", \n", $temp);
+  
+  if ($sub) $jsarray .= "\n$indent";
+  $jsarray .= "}\n";
+  return $jsarray;
+} 
\ No newline at end of file
