On Sunday, 20 June 2021 at 13:58:22 UTC, vnr wrote:
Thanks for the answers, I understand better what is going on.
So, what should I do to make my server respond with a random
image, and not the random image page? I'm fairly new to vibe.d,
so I don't yet know the intricacies of how to handle this style
of thing and I couldn't find how to do it in the documentation.
Thank you.
Responding with a random image is an option, but what you have is
a good start, you just need to also serve images on request.
I'm very distracted right now or I would've included more in my
earlier post, but Vibe's online documentation has what you need.
Try, especially, https://vibed.org/docs#http-routing
You want a route for the random-image page, and you want to serve
static files under images/