leandro
2016-10-1 11:16:37

hello racketeers!


leandro
2016-10-1 11:17:13

I’m having a hard time figuring out how to serve a web-server/dispatch-defined set of dispatching-rules


leandro
2016-10-1 11:17:56

I figured I should be using serve/servlet for it, but it kinda ends up bring up a set of other endpoints that I don’t want to have


leandro
2016-10-1 11:18:13

and in general seems to not be taking in the dispatching rules into account, at all really :stuck_out_tongue:


leandro
2016-10-1 11:20:54

leandro
2016-10-1 11:58:35

anyone has any real-life examples of REST-like web services built on top of web-server/dispatch that I could learn from? :slightly_smiling_face:


leandro
2016-10-1 16:07:31

alright! figured out what was the problem :slightly_smiling_face: - turns out that not only I needed to specify a #:servlet-regex #rx”” when using serve/servlet but I also needed a catch-all route in my dispatch-rules


leandro
2016-10-1 16:07:37

(if anyone cares)


leandro
2016-10-1 16:29:46

and while we are at it, any advice on deploying a racket web server?


notjack
2016-10-2 00:43:52

@leandro Docker is probably the easiest way


leandro
2016-10-2 00:51:21

@notjack yup, was thinking of making a small container with the executable inside


leandro
2016-10-2 00:51:44

that’s how I’m doing erlang releases too


notjack
2016-10-2 00:52:18

If your app is structured as a package whose main.rkt file starts the app, then the racket-onbuild images I made will Just Work with it


leandro
2016-10-2 00:52:19

but I might be missing some stuff when it comes to using raco exe … since I can’t seem to run my executable due to a missing collection (tzinfo ?)


leandro
2016-10-2 00:54:43

@notjack link? I’m looking mainly into a split build and run image, so I can build the executable in an alpine image, and bundle it as a separate, minimal image that can only run it (typically under 10mb + the piece of software to be ran in there)


notjack
2016-10-2 00:55:20

You’ll have a lot of trouble building racket in an alpine image since racket uses glibc rather than musl



leandro
2016-10-2 00:57:48

interesting!


leandro
2016-10-2 00:58:01

starred. will have a look


notjack
2016-10-2 00:58:36

They’re available on docker hub as well


notjack
2016-10-2 00:58:40

jackfirth/racket