Next: More complex URL remapping, Previous: Simple HTTP server, Up: Hello World [Contents]
Type these code in Guile REPL:
(use-modules (artanis artanis)) (init-server) (get "/hello" (lambda () "hello world")) (run #:port 8080)
Now you can visit http://localhost:8080/hello with your browser, and (hopefully) see the result.
If you encounter "[EXCEPTION] /favicon.ico is abnormal request" , please just ignore that warning.
Let me explain the code:
You may type Ctrl+C to quit and stop the server, see also the message printed on the screen accordingly.