View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

How-To Use and Setup Comanche

Ok guys, here's the down-low if you're having problems with Comanche:
  1. Use Squeak 3.7, NO OTHER VERSION WILL WORK. Download at http://ftp.squeak.org/3.7/win/Squeak3.7-current-win-full.zip. The Squeak 3.7gt version available off this class's Swiki also works.
  2. Open Squeak, Left Click for World Menu -> open -> SqueakMap Package Loader ("Universe Browser" if you're using 3.7gt)
  3. Select "yes" when asked to upgrade the package loader. (You will not be prompted if using 3.7gt)
  4. Install Dynamic Bindings, KomServices, and KomHttpServer. Find each of them in the list then right click on the main branch and select "install". (For 3.7gt, click on the package, then click "select package" on the right, then click "install selections" at the bottom, repeat for each of the 3 packages)
to start:
	| ma |
	ma := ModuleAssembly core.
	ma serverRoot: FileDirectory default fullName.
	ma documentRoot: FileDirectory default fullName.
	ma directoryIndex: 'index.html index.htm'.
	ma serveFiles.
	(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule

to view, point a browser to:
	http://localhost:8080

to stop:
	TcpService services do: [ :a | a stop ].

Look at the case study Web Interfaces, Comanche Style for help on handling the http requests, figuring out what is being requested , and how to send a response.

I would also HIGHLY recommend using Seaside, a web framework that uses Commanche. Seaside is available through the package browser. See the WD40 Case Page for Seaside help and suggestions.

Links to this Page