The code download for the baf demo includes a little toy WEBrick server to get all the urls resolving correctly. Each step includes a different server. So, for example, the server for Step 1 is at code/baf/step1/server/baf.rb. Here is the interesting stuff in the file…
server= HTTPServer.new(:Port=>8002, :DocumentRoot=>’C:/dev/dojo-book/code/baf/step1’)
server.mount(“/dojoroot”, HTTPServlet::FileHandler, “C:/dev/dojo/dojo-release-1.1.0-src”)
server.mount(“/dojoroot/baf”, HTTPServlet::FileHandler, “C:/dev/dojo-book/code/baf/step1/baf”)
server.mount(“/dojoroot/obe”, HTTPServlet::FileHandler, “C:/dev/dojo-book/code/baf/step1/obe”)
This server necessarily assumes that required directories exist at prescribed locations. These are as follows:
1.The “code” directory in the download should be a child of “C:/dev/dojo-book/”
- Dojo should be installed at “C:/dev/dojo/dojo-release-1.1.0-src” (so, this directory will contain the dojo, dijit, dojox, and util directories and dojo.js will exist at “C:\dev\dojo\dojo-release-1.1.1-src\dojo\dojo.js”).
Of course you can change these around by editing the baf.rb servers.
With this in place you can start the server for Step 1 by typing “ruby C:\dev\dojo-book\code\baf\step1\server\baf.rb”. This assumes ruby has been installed (I noticed you were using IE7, so assuming you’re on windows, you can get ruby quite easily at http://rubyforge.org/frs/download.php/29263/ruby186-26.exe).
Here are the urls for each step:
Notice that the first step has no testing ability; Steps 2-4 use test “run001”; Step 5 uses test “run002”.
Don’t forget the servers are different for each step (and you must stop one server before starting another):
I hope this helps. I’ll get this into a readme as you suggested.
It is important to me that you’re successful with this. Feel free to ping me at “email@example.com”.
Finally, thanks so much for the nice compliment. It’s appreciated.