title: How do I find out the websocket url of my server?
body: <p>I am trying to host a web app on Openshift. I am using a websocket that handles all the connections. However,I am not sure what value to enter for my socket url. I have a .js file that reads:</p>
  
  <pre><code>...
  // socket connection url and port
  var socket_url = '192.168.8.102';
  var port = '8080';
  
  $(document).ready(function() {
  
      $("#form_submit, #form_send_message").submit(function(e) {
          e.preventDefault();
          join();
      });
  });
  
  var webSocket;
  
  /**
   * Connecting to socket
   */
  function join() {
      // Checking person name
      if ($('#input_name').val().trim().length &lt;= 0) {
          alert('Enter your name');
      } else {
          name = $('#input_name').val().trim();
  
          $('#prompt_name_container').fadeOut(1000, function() {
              // opening socket connection
              openSocket();
          });
      }
  
      return false;
  }
  
  /**
   * Will open the socket connection
   */
  function openSocket() {
      // Ensures only one connection is open at a time
      if (webSocket !== undefined &amp;&amp; webSocket.readyState !== WebSocket.CLOSED) {
          return;
      }
  
      // Create a new instance of the websocket
      webSocket = new WebSocket("ws://" + socket_url + ":" + port
              + "/WebMobileGroupChatServer/chat?name=" + name);
  
  ....
  </code></pre>
  
  <p>When i test it locally,it works perfectly using my local ip address of 192.168.8.102 as the socket_url. However, if I were to put my program up for online hosting,what value of socket_url should I enter instead? My domain name is <a href="http://jbosslew-weihao.rhcloud.com/" rel="nofollow">http://jbosslew-weihao.rhcloud.com/</a></p>
  
  <p>When I test it locally using tomcat apache server, the domain name is 
  <a href="http://192.168.8.102:8080/WebMobileGroupChatServer/" rel="nofollow">http://192.168.8.102:8080/WebMobileGroupChatServer/</a></p>
  
  <p>How do I find out the socket url of my server on openshift?</p>