Version: 4.0.2.6

1 Using Instaserlvet

Using Instaservlet is as simple as requiring the Instaservlet module and calling go! with your servlet function. For example, the following is a complete servlet that uses Instaservlet to handle all web-server configuration:

  (require (planet untyped/instaservlet/instaservlet))

  

  (define (servlet request)

    '(html (head (title "It's working!"))

           (body (h1 "Instaservlet is in the house!"))))

  

  (go! servlet)

That is basically all there is to Instaservlet. By default the web-server listens on port 8765 to connections from the localhost only. You can change this by passing optional arguments to "go!". See the Instaservlet API for details.