I am not sure if anything in this https://github.com/ZelphirKaltstahl/racket-markdown-blog/blob/master/blog/server.rkt#L51 helps you.
On Wednesday, January 30, 2019 at 4:42:57 PM UTC, cwebber wrote: > > It seems like it should be so simple, and like Racket has the tools > already, but I can't figure out how to do it. > > I have the following: > > (serve/servlet start > #:servlet-regexp #rx"" > #:launch-browser? #f) > > I'd like to do something like the following: > > - Serve static files for urls matching /static/* > - Serve those very files from the ./static/ directory > > I'd expect I'd do something like combine that all with: > > (file-dispatch:make #:url->path (make-url->path > (build-path cwd "static"))) > > But I'm lost. I can figure out how to serve static files OR use the > controllers in my start function, but combining them....??? I'd like to > serve some static files *in addition* to my the above code. Between > dispatchers and servlets and even the file serving dispatchers, I > thought I could figure out something relatively easy out of the box. > But hours later I'm still scratching my head about how to combine > servlets or dispatchers or what have you. > > I've read a bunch of things: > - https://www.greghendershott.com/2013/03/serve-static-files.html > - https://docs.racket-lang.org/web-server-internal/dispatch-files.html > - > https://docs.racket-lang.org/web-server-internal/dispatch-sequencer.html > - and pretty much everything under > https://docs.racket-lang.org/web-server/ > > ... but I can't figure out how to do it without reinventing all the > machinery that appears to already exist in Racket. There must be > something obvious and simple right in front of me. > -- 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.