[Seaside] HTTP Server Structure
Sven Van Caekenberghe
sven at beta9.be
Mon Nov 17 19:31:48 CET 2003
On 17 Nov 2003, at 17:47, Stephen Pair wrote:
> For Comanche 6.2, the following will start an http file server on your
> default directory:
>
> | 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
Yeah, I found that somewhere in a class comment, I now have it working
as
| ma |
ma := ModuleAssembly core.
ma serverRoot: (FileDirectory on: '/Users/sven/Sites/') fullName.
ma documentRoot: (FileDirectory on: '/Users/sven/Sites/') fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
I don't understand the difference between #serverRoot and
#documentRoot, I thought an HTTP service only needed a directory to
serve files from, and an optional URL prefix ?
> The best docs for Comanche 6.2 (registered as KomHttpServer on
> SqueakMap) are located in various class comments. Start with the
> class comments for KomHttpServerInfo. Most (if not all) of the
> ComancheModule subclasses also include helpful class comments with
> examples.
There are indeed some class comments, but the overall structure is
quite factored and hard to follow/grasp. Many classes in Squeak(Map)
are lacking (class) comments. Unless I am mistaken and remember it
incorrectly, VisualWorks used to be (and maybe still is) much better in
that respect (let alone the fact that there was a real manual).
Thanks for the help,
Sven
More information about the Seaside
mailing list