[Seaside] ZnZincStaticServerAdaptor and debug

François Stephany tulipe.moutarde at gmail.com
Wed Apr 16 08:55:40 UTC 2014


Actually it works fine but I still doesn't have a debugger popping up in
case of error. I still get a 500 page with the error message. This is how I
start it:

    CCZincStaticServerAdaptor startOn: 8080.
    CCZincStaticServerAdaptor default server debugMode: true.

Any thing that I'm missing?


On Tue, Apr 15, 2014 at 6:06 PM, François Stephany <
tulipe.moutarde at gmail.com> wrote:

> I quickly put this together:
> It will serve stuff placed in the assets directory (which must sit next to
> the image). Nothing really fancy but does the job:
>
> ZnSeasideStaticServerAdaptorDelegate subclass: #CCStaticServerDelegate
>     instanceVariableNames: ''
>     classVariableNames: ''
>     category: 'Cocotte-Web'
>
> CCStaticServerDelegate>>handleRequest: znRequest
>     znRequest url firstPathSegment = 'assets'
>         ifTrue: [
>             znRequest url removeFirstPathSegment. "eats the /assets/"
>             ^self staticDelegate handleRequest: znRequest ]
>         ifFalse: [  ^self adaptor process: znRequest ]
>
> CCStaticServerDelegate>>initializeStaticDelegate
>     | assetDirectory |
>     assetDirectory := (FileLocator imageDirectory / 'assets').
>     ^ ZnStaticFileServerDelegate new
>         directory: (ZnFileSystemUtils directory: assetDirectory)  ;
>         yourself
>
> And the Adaptor:
>
> ZnZincStaticServerAdaptor subclass: #CCZincStaticServerAdaptor
>     instanceVariableNames: ''
>     classVariableNames: ''
>     category: 'Cocotte-Web'
>
> ZnZincStaticServerAdaptor>>defaultDelegate
>     ^ CCStaticServerDelegate with: self
>
>
> On Sun, Apr 13, 2014 at 3:16 PM, Johan Brichau <johan at inceptive.be> wrote:
>
>> To serve static files from a directory during development, there still is
>> the Seaside-Filesystem package.
>> -> Load the 'Filesystem' group from ConfigurationOfSeaside3
>>
>> But I also do intend to replace it with serving static files from Zinc
>> directly though. But, in the meantime, it's doing the job.
>>
>> Johan
>>
>> On 10 Apr 2014, at 08:39, François Stephany <tulipe.moutarde at gmail.com>
>> wrote:
>>
>> > Ok. I've got quite a bit of external files, I'll roll my own ;)
>> >
>> > thanks !
>> > ​
>> > _______________________________________________
>> > seaside mailing list
>> > seaside at lists.squeakfoundation.org
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20140416/5fee3572/attachment.htm


More information about the seaside mailing list