Friday, October 28, 2011

Mongoose for local web serving.

One of the hassles of my prototype development has been serving the web pages.  iPad Safari is very picky about simply mounting Windows shared folders.  I was stuck publishing my HTML and JavaScript/CSS to my personal website, then viewing it on my iPad.  It was a clunky process that added several extra steps when I was debugging code.

I described this problem over on the Fear the Boot forums and immediately got a great answer.  Runester of "Postcards from the Dungeon" fame recommended Mongoose as a solution.  Mongoose is a free Google open source project.  It provides a very lightweight web server.  You just fire up the mongoose-3.0.exe executable in the directory you want to share, and it is immediately published on your local WiFi network as http://localhost:8080  or http://ip_address:8080.  Mongoose also provides single-click start/stop service, so it's extremely handy.  I can now hammer code on my laptop, hit refresh on my iPad, and instantly see my code updates.

I had already planned on buying an Apple Airport for my secure home network and streaming stereo solution.  I wouldn't want to run a web server from my laptop while it's connected to the Internet, but since I already have a separate WiFi router for that, I'll just leave my Airport detached as a purely local loop.

No comments:

Post a Comment