Putting a website on a cd

gav on 2003-02-17T00:36:04

I've just finished burning beta 2 of a cdrom which is a offline version of a client's website.

Basically they have 10,000 products, so on the cd is 10,000 images, thumbnails and html pages (making up about 350 meg of data). Windows 2000 doesn't like to deal with directories that big and neither does Roxio. Luckily I have a cd writer that won't make toasters and seems fairly happy sitting at 1% buffer remaining burning a cd very slowly.

The html is built using the wonderful Template Toolkit, with a little help from Image::Size and Storable.

The cdrom is brought alive with Microweb which runs as webserver locally and also starts up MySQL which is used for data storage.

Perlapp from Activestate was used to turn the Perl cgi scripts into exe files. This meant that I didn't need to worry about distributing Perl on the cd and it stops anyone easily poking about in the source.

Just hoped this might be helpful for anyone looking at doing a similar thing in the future.


Why not PAR and have the webserver be in Perl?

merlyn on 2003-02-17T22:04:08

Why not use PAR (in the CPAN) and chromatic's mini-web-server in pure Perl that does Template Toolkit and CGI-like interfaces as well? Then you have only one technology to mess with. You can even package a different binary for each of the likely platforms (like windows, Linux, etc) on the CD.

Re:Why not PAR and have the webserver be in Perl?

gav on 2003-02-17T22:18:42

The target market is 99% windows. For everyone else they have a cd with static content they can access as they see fit.

Microweb is a pretty decent product, you can make it autoplay, fire up the webserver, copy over any mysql databases you need, start mysql and then open the index page in the user's default web browser. It's that kind of slickness I like and $299 is easily affordable. I'm not sure how I could do something similar with a pure Perl solution.