Improve grd program in Gambit REPL iOS example (add "mv" command, on Windows provide...
[gambit-c.git] / examples / web-server / README
blob30e9e4b74a593cb26de06de4c84d67250c7a96b9
1 This example implements a minimal web server which makes it possible
2 to access the web server's filesystem from a browser and calculate
3 the sum of numbers entered by the user.
5 In the filesystem browser, directories are presented as a numbered list
6 of files.  Regular files ending in ".htm" and ".html" are send back to
7 the browser as-is, otherwise HTML is dynamically generated to display
8 the file's content verbatim.
10 The calculator is an example of web-continuations.  The web server
11 interacts with the user to obtain a set of numbers to add.  At each
12 step the sum of the numbers entered up to now is displayed.  Within
13 each HTML page generated is a form to enter the next number.  This
14 form has a hidden field which contains a serialized continuation
15 indicating the continuation within the web server where the number
16 entered must be returned.  When a thread is created by the web server
17 to reply to the form submitted, that thread will invoke the
18 continuation to return to the point where the (now dead) thread
19 generated the form to obtain the next number.
21 After starting the server with
23                       gsi base64 html http web-server 8000
25 with your favorite browser visit the URL
27                       http://localhost:8000/