Anyone building plain old webservices with Racket?
What is a plain old webservice? :sun_with_face:
http (not gemini), json, rest-like web apis :slightly_smiling_face:
@telepopsound has joined the channel
Oh, I get it now. I had forgotten about those. So, not me. I do run a couple of web services, but they provide JSON strings.
Yes, there are people who do that (the racket pkg server is an example)
As a Racket learning project I “re-created” a little Go web API (which is currently my main bread and butter language).
Go CLOC ~320 (libraries not included) Racket CLOC - first working version ~115, Racket CLOC – 2nd iteration ~70 (no libraries needed)
It was a little painful though. I’m a pragmatic programmer, don’t come from an academic background. I’m now assessing the readablility of my code for others.
can you share your code?
But these are really my first baby-steps in Racket (or any Lisp-dialect), so please be forgiving :slightly_smiling_face:
Good read, thanks! It’ll certainly help.
Now I’m going to host that somewhere on a PaaS. Docker is the way to go I assume. Or does anyone have experiences with Heroku buildpacks?
Plugging another one of my articles: https://defn.io/2020/06/28/racket-deployment/
There are also official Docker images: https://hub.docker.com/r/racket/racket and, although I prefer the approach in the article, Docker’s probably going to be the quickest way to get it done
You mean you prefer the put an executable on a host way?
Yeah
Yes, it’s quick and easy to do that on a DO droplet
Looks like you have quite some stuff running in Racket
ah you are the author of koyo… I’ll have a look at that
Yup :smile:. I tend to build exes/distributions even when I use Docker. An example:
that dockerfile looks very straightforward
i’ll give it a try
for the next bigger project I’ll probably try koyo, looks like there is everything included I need, json, job queue, database etc.