Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Guile's builtin server is similar:

    (define (hello-world-handler request request-body)
      (values '((content-type . (text/plain)))
          "Hello World!"))


IIUC, this is the handler for all requests, not just `GET` with path `/hello/<NAME>`.

It doesn't implement what many Web "backend" developers now call "routing", which means the programmer specifying a rule-based mapping of URL patterns to a set of handlers for different kinds of requests using a simple DSL, and then at run time the library/framework performing the parsing and dispatch based on those rules.

With that stock Guile library only, I think you'd instead have to manually parse the `request` argument, like in this example:

https://www.gnu.org/software/guile/manual/html_node/Web-Exam...




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: