[Seaside] static content

C. David Shaffer cdshaffer at acm.org
Thu Feb 17 15:16:36 CET 2005


Jason Rogers wrote:

>How does one serve static content using Seaside with Comanche without
>Apache?  How about with Swazoo?
>
>Thanks in advance.
>
>  
>
 From the Kom description on SqueakMap

| ma seaside |
seaside := WAKom default.
ma := ModuleAssembly core.
ma serverRoot: FileDirectory default fullName.
ma alias: '/seaside' to: [ma addPlug: [:request | seaside process: 
request]].
ma documentRoot: FileDirectory default fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule


This lets you serve files from your image dir (FileDirectory default).  
You could obviously change that to serve from anywhere.  If you're going 
Squeak-only you definitely want to study the various Kom modules and 
ModuleAssembly.  Especially KomLogger and the various *log* methods in 
ModuleAssembly so you can get some basic logging.

Hope this helps...

David


-- 
C. David Shaffer
http://www.cs.westminster.edu/~shaffer
http://www.shaffer-consulting.com



More information about the Seaside mailing list