Friday, January 02, 2009

A Server Environment On A Stick

I just deployed a Flex App for a client, and she asked if she could demo it at her next trade show. Oh, and there's one small hitch - there's no Internet at the show. While Flex itself doesn't require a server environment, the entire app depends on some server side PHP scripts.

The bottom line: if she wanted to run this app on her laptop, she would need a basic Apache and PHP install.

To make matters more complicated, she's not local - so I can't just drive over to her office and install/configure the software.

After some poking around, I think I found a solution: Portable Apps XAMPP. XAMPP is a package that includes Apache, PHP, MySQL and other goodies. It's a complete server environment. The Portable Apps version is the same thing, but runs off a thumb drive. How cool is that?!

So, here's what I did:

  • Visited http://portableapps.com/apps/development/xampp
  • Downloaded the .zip file version of XAMPP and the Launcher
  • Picked up a 4 Gb thumb drive from Best Buy ($12.99, on sale no less)
  • I unzipped the XAMPP file to the thumb drive (which was H:\ on my computer)
  • I ran the installer for the launcher and told it to install on the thumb drive (again, H:\)
  • I then installed my web app in H:\xampp\htdocs\app
  • I edited H:\xampp\htdocs\index.php to link to my app

And I was all set. To use the drive, I went to a computer not running Apache and did:

  • Plugged in the drive
  • Using Windows Explorer, browsed to H:\xampp and clicked on XAMPPLauncher.exe to start the launcher
  • I clicked start next to Apache
  • I opened up a web browser and pointed it to: http://localhost/ - and Holy Smokes!, my web app was there.

Here's what the Launcher looks like:

All that was left to was to Express Mail the drive to my client so she could run the above.

I'm really impressed with this sort of solution for running demo software. Not only do you not have to worry about having Internet access, but you don't even need worry about having a specific laptop handy. Between PortableApps.com and a $15.00 thumb drive, truly amazing things are possible.

2 comments:

  1. Anonymous7:53 PM

    You've heard of WAMP before, right? So this is just like WAMP just that it lives on a flash drive?

    ReplyDelete
  2. Yes, that's true. It's also setup in such a way that a non-programmer can use it.

    -Ben

    ReplyDelete