MENU:   HOME  ·  SERVER  ·  APPLICATION  ·  CONSOLE


Vimeo Video Tutorials ( HD )      Twitter Follow Updates @socketbug_dev      Support Support & Feature Requests


Socketbug Logo

License Socketbug is licensed under the LGPL v3 license.

Socketbug Console Installation Video

Vimeo Watch our Video Tutorial on How to do a Socketbug Console Installation

Then you can follow along below ;)

Installing Socketbug - The Console

If you have not already setup your Socketbug Server, you should DO THIS FIRST.

Also, If you have not already setup your Socketbug Application, you should DO THIS TOO.

With the Socketbug Server up and running, and your Socketbug Application ready for action, it’s time to setup the Socketbug Console.

To do this you will need to use the Socketbug Client Side code. This can be on the same machine that has your server running on it, but it certainly does not have to be.

The purpose of the Client Console code is for you to connect to and manage you Mobile Web Applications through communication with the Socketbug Server. How you set this up is entirely up to you.

#1 Setting up the Socketbug Client Console

To connect your Console to Socketbug, you will need public access to the client folder contained in the Socketbug Repository.

This can be achieved by Hosting the Client Console Code on Your:

  1. Local Development Machine

  2. Central Server

  3. Content Distribution Network ( CDN )

The code that needs to be copied over from the Socketbug Repository is located in the ./client/console/ folder.

If you do not already have a copy of the Socketbug code, you can download the code to a folder of your choice.

If you are running a local server, like Apache, you may want to stick Socketbug in your local servers Document Root.

The Document Root is what is shown when you go to http://localhost/ on your machine. So it might be nice to setup Socketbug in http://localhost/socketbug/ .

If you do not know where your Document Root is, here are a few common locations for some popular Programs:

XAMPP:

MAMP:

So let’s go ahead an assume you need to download Socketbug, and that you want to stick it in your Document Root. Also, just for this example, let’s say your Document Root is /var/www/html, as that is pretty common on some servers.

Now, let’s download Socketbug:

cd /var/www/html
git clone https://github.com/manifestinteractive/socketbug.git

A new folder was created in your Document Root called socketbug and you should be able to access the folder http://localhost/socketbug/ . If you have directory listing turned off, you can got to the example folder to verify you downloaded Socketbug to the correct folder:

http://localhost/socketbug/client/example

#2 Connect Your Console to Socketbug

To connect your Console to Socketbug, you will need to open the index.html file in the console folder and make some changes. The file you are looking for should be located:

http://localhost/socketbug/client/console/index.html

with a relative path from your Socketbug install folder:

./client/console/index.html

Go ahead and open this file in your favorite text editor so we can make some changes.

Note: For this example, we are still assuming your Socketbug Client code is located at http://localhost/socketbug/ . You will need to update this if it is not your actual location.

Here is the code you need to look for:

<script type="text/javascript">
var _sbs = _sbs || {

    'version': '0.2.0',
    'host': 'http://localhost',
    'port': 8080,
    'group_id': '4704808A-80A9-6DD3-341F-E18A3F00563A',
    'group_name': 'Socketbug Demo Group',
    'application_id': '5E3E8FB6-86CF-6BF8-B4C4-6B2497BC388C',
    'application_name': 'Socketbug Demo Application',
    'debug_level': 4,
    'helpers': [],
    'libraries': [],
    'plugins': [
        'plugins/gui/command/main',
        'plugins/gui/output/main',
        'plugins/gui/settings/main',
        'plugins/gui/view_source/main',
        'plugins/gui/command/autocomplete'
    ]

};
</script>
<script type="text/javascript" src="http://localhost/socketbug/client/console/sb.js" async></script>

Before you try to connect, you will need to update some of the variables. Here is an explanation of what each of them are, and what they do in Socketbug. The ones labeled as REQUIRED are just that. Socketbug will fail if these are not set. The ones labeled OPTIONAL can be left out entirely with no issues.

There are only two more items that need you attention. The last line that loads the Javascript file has to Paths that need to be set correctly. Here is what you are looking for:

<script type="text/javascript" data-main="http://localhost/socketbug/client/console/lib/init" src="http://localhost/socketbug/client/console/sb.js" async></script>

That parts that need your attention are:

#3 Open the Console

OK, now that you have setup your Console with the Socketbug Javascript, you are ready to connect.

Go ahead and open up the Socketbug Console in your favorite modern browser by going to http://localhost/socketbug/client/console/index.html or wherever you installed your Socketbug console.

To execute a command, type in the input box at the bottom of the Console page. To run a saved command, like Viewing the Remote Source Code, select the option from the SOCKETBUG COMMAND LIST in the top left of the page.

You can toggle open/close the settings and output windows by clicking on their tabs.

So Now What?!?

Have fun and Please Help Improve Socketbug with your Feedback at http://socketbug.userecho.com