[plt-scheme] Newbie question about PLT web application

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat Apr 18 23:58:32 EDT 2009

Hi gadva,

I don't understand what you mean be "put the server online". This
message might explain something useful to you.

PLT Web apps are not like Perl CGI Web apps that can be served off a
server like Apache that you're likely to find on a hosting company,
like FatCow. PLT Web apps run inside a custom PLT Web server. If you
want to run a live application, like mail.google.com, then you have to
run the PLT server on the host (modulo proxying, etc). [Caveat, you
could build a CGI proxy fairly easily, but FatCow (eg) doesn't have
PLT installed, so it's a no go.]

So, the only way that the server runs is how it runs when you use
web-sever/insta, serve/servlet, or plt-web-server. Once the server is
running on whatever port, it's up to you to direct live traffic there


On Sat, Apr 18, 2009 at 8:22 PM, gadva <gadva1g at gmail.com> wrote:
> Hello everyone,
> I've started working on the basic blog application described on the
> PLT Scheme Website, but I can't seem to figure out how to put the
> server online.
> Does the following simply launch an application on the localhost, but
> not put it online?
> #lang web-server/insta
>  (define (start request)
>   '(html
>     (head (title "My Blog"))
>     (body (h1 "Under construction"))))
> >From what I understand there are some other steps to putting the
> server online but I can't seem to get it to work. I don't have access
> to port 80 so I am trying to launch it on port 8000 or 8080. Are these
> ports blocked from remote users connecting to the server?
> If there are other steps to putting the basic page above online could
> someone provide some code I can add to it so that it works?
> Would adding the following be a step in the right direction?
> #lang scheme
>  (require web-server/servlet)
>  (provide/contract (start (request? . -> . response/c)))
> ..
>  (require web-server/servlet-env)
>  (serve/servlet start
>                 #:launch-browser? #f
>                 #:quit? #f
>                 #:listen-ip #f
>                 #:port 8000
>                 #:extra-files-paths
>                 (list (build-path your-path-here "htdocs"))
>                 #:servlet-path
>                 "/servlets/APPLICATION.ss")
> Thank you in advance!
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

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

Posted on the users mailing list.