You'd have to build it yourself, by doing a `set!` in the REPL to inject the new function in. On Wed, Oct 3, 2018 at 8:10 AM Cam <cam@tindall.space> wrote: > > > I am playing around with the built-in webserver functionality with > `servlet/serve' and am wondering if there is a way to automatically > "reload" the servlet, for lack of better terminology, when I am playing > in the REPL. In other words, if I do something like this in the REPL: > > (define (about-page req) > (response/xexpr > '(html (body (h1 "about"))))) > > (define-values (dispatch handler->url) > (dispatch-rules > [("about") about-page])) > > (serve/servlet > #:port 8088 > #:listen-ip #f > #:servlet-path "/" > #:servlet-regexp #px".*" > dispatch) > > ...and then redefine `about-page' like this: > > (define (about-page req) > (response/xexpr > '(html (body (h1 "something else"))))) > > ...I would like to refresh my browser on the `/about' page and see > "something else" instead of "about". > > Is there some way to achieve this? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
-- -=[ Jay McCarthy http://jeapostrophe.github.io ]=- -=[ Associate Professor PLT @ CS @ UMass Lowell ]=- -=[ Moses 1:33: And worlds without number have I created; ]=- -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.