[plt-scheme] plt-web-server configuration

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Oct 27 14:17:49 EDT 2008

On Sat, Oct 25, 2008 at 6:10 PM, Marek Kubica <marek at xivilization.net> wrote:
> Hi,
>
> Thanks for your fast answer. Unfortunately I still have some problems.
>
> On Sat, 25 Oct 2008 12:26:07 -0600
> "Jay McCarthy" <jay.mccarthy at gmail.com> wrote:
>
>> Ah, I see. You can use read-configuration-table [1] to read it in,
>> change it, then use configuration-table->web-config@ [2] to get a
>> web-config to link with the web-server unit. Look at the code for the
>> launcher to see how it does it.
>
> Ok, I can read it in, change the port (haven't yet tried the rest but
> ok) and then.. well, I'm stuck. I was able to convert the
> configuration-table to a sexpr (because
> configuration-table->web-config@ did not take a configuration-table but
> rather a path to a file which contains a sexpr which is a configuration
> table) and converted it to a web-config at . That's where I got stuck.
>
> I thought I can feed my web-config into web-server@ from
> web-server/web-server-unit, but unfortunately I'm too much of a
> beginner to understand what web-server@ wants to get as a parameter. I
> looked into the launcher, but had trouble understanding what actually
> happens with web-server at .
>
> And by the way, could someone explain what @ and ^ mean? I know that
> it's standard in Scheme to use / -> ? and ! (which, except for the /
> are easily understood), MzScheme extends that to % for classes but
> adding more and more characters reminds me a bit of the string
> functions in some Basic dialects or PEP 3117[1].

@ is a unit.

^ is a unit signature.

A unit is (essentially) a parameterized module. In this case, the
web-server@ is parameterized over its configuration, which is
represented by another unit with a bunch of functions and values that
define its behavior.

You want to look at web-server/private/launch.ss and essentially
change configuration@ to whatever web-config@ you get from parsing the
configuration table.

Jay


-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://jay.teammccarthy.org

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.