Installing LXW

From ISoft Wiki
Revision as of 12:09, 1 March 2013 by Duff (talk | contribs) (Configure config.json: Removing unnecessary data)
Jump to: navigation, search

The new version of ITrack LX, colloquially known as LXW, is the faster and sexier version of ITrack designed to run in the browser, primarily on handheld scanner devices.


Besides the regular version of MySQL used by ITrack Enterprise, LXW requires:

Installing the server-side code

This is the PHP code that talks to the database! It should be checked out somewhere that is not accessible via HTTP.

The directory to check out is

To configure the database connection, edit /lxw/configs/database.php.

Installing the client-side code

This is the code that is accessible via HTTP! Check it out to your Apache htdocs folder, or whatever other folder will get it served up to the tubes.

The directory to check out is

To configure the connection to the server-side code: edit line 15 of server/index.php to point it at the path where you checked out the server-side code.

To configure client application settings (which should all have reasonable defaults), you can edit the config.js file in the client path.

Setting Up the Auto-Updater

This is the process that will download updates for LXW and then install them.

  1. Transfer contents of this directory to the server hosting LXW. The standard directory for Linux based servers is /var/www/lxw/updater (This directory will not exist yet.)
  2. Configure config.json
  3. Run the .sh files
  4. Add updater to crontab

Configure config.json

An example of a config.json

       "update_url": "autoupdate URL here",
       "product_code": "valid product code here",
       "download_directory": "/var/www/lxw-release/updater/downloaded-all",
       "destination_directories": {
               "default": "/var/www/lxw-release/updater/downloaded-latest",
       "extraction_directories": {
               "": "/var/www/html/lxw",
               "": "/var/www/lxw-release"

After the updater is run properly then a new section will appear below this section and it will look like this.

"versions": {
"": "#####",
"": "#####"

Run .sh Files

Unfortunately as of February 25th 2013 you are unable to run the .sh files as they will be unable to find the config file. Instead you can run the contents of the files without any problem. Here is an example of each file as you would use it for LKQ.

sudo npm install isoft-updater -g

node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json

Add Updater to Crontab

The last bit to setting up the auto updater is the "auto" part. Here is how to access and edit the crontab.

crontab -e

This is what LKQ's crontab looks like for the autoupdater.

 12 21  *   *   *   node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json

This is the format that crontab uses.

*  *  *  *  *  command to be executed
-  -  -  -  -
|  |  |  |  |
|  |  |  |  +----- day of week (0 - 6) (Sunday=0)
|  |  |  +------- month (1 - 12)
|  |  +--------- day of month (1 - 31)
|  +----------- hour (0 - 23)
+------------- min (0 - 59)


Removing the version section in config.json will cause it to redownload the latest update during the next scheduled update cycle or forced update. Can be used to test the process.


Browsing to the [the URL you would expect to correspond to the client-side files you installed]/server/index.php should show you a snide remark embedded in JSON.

Browsing to the regular URL should show you a screen asking you to identify your store number (assuming that your web server is configured to serve up index.html files when you browse to a directory).