I've been reading Nim in Action and I gotta say I love the book....all the way up until the part about building a twitter clone. Now the thing is that it uses jester. But as I understand, Jester does not work anymore and you have to use a fork of it and httpbeast in order to make it work.
And as a frame of reference I'm a beginner in all this but eventually I want to be able to push out something for production with Nim code once I become more experienced with Software Engineering concepts.
This forum website as I understand was built with Jester... although... my thing is....I don't want to use it.
So I go and stumble into the standard library and I see the asynchttpserver module and I read:
This module implements a high performance asynchronous HTTP server.
This HTTP server has not been designed to be used in production, but for testing applications locally. Because of this, when deploying your application in production you should use a reverse proxy (for example nginx) instead of allowing users to connect directly to this server.
And I'm actually thankful for this statement because again, I don't know what I'm doing.
But looking into it further I want to understand how I can fit Nim into building an actual site, let's assume I want to structure a website together, what exactly would I have Nim doing? And how could I go about "architect-ing" components that make up an MVC solution?
What is your previous experience with webdev? Do you come from ASP.NET, Node.js with Express?
With Nim, there isn't a large selection of mature and highly-opinionated frameworks comparable to Laravel or Django. There are, however, a few libraries that are similar to Express and Flask, such as Mummy or Gildenstern. I haven't used Jester in a few years, so I can't speak to that one.
In any case, knowing your background and expectations would help us better answer your question.
See my recent post: https://forum.nim-lang.org/t/13315
Try Mummy for your web server. It's simple to use and fast. Then Karax for the web app.
To migrate from jester to mummy you can use mummy_utils (search forum on jester, mummy and mummy_utils).
Also I sometimes add my personal approach (kind of easy but its not allways the official way):
My usual stack is:
Mummy
My mummy router https://github.com/enthus1ast/nimMatchingMummyRouter
Nimja (templates) https://github.com/enthus1ast/nimja/
Database https://github.com/treeform/debby/
For spa karax.
The answer likely depends on what kind of app architecture/stack you want to use. as in: SSR monolith? SPA? something fancier? I came from laravel (mostly SSR monolithic apps) and started with Nim in Action and found the book very helpful, but Jester was abandoned even back then. I tried Prologue and had a working app in dev, but it crashed in production. It could be that i was supposed to write more code to handle bad bot requests or something, IDK. I've used Mummy and it's pretty good if you don't need multipart parsing for large file uploads. It's probably easier to get going with compared to Guildenstern. Guildenstern if you do need chunked multipart. I use nginx for reverse proxy, Guildenstern for app server (routing, templates, multipart form parsing, etc), Nim SCF in my Guildenstern app for templates, vanilla js for any front end fanciness (for now...), SQLiteral for sqlite db data and I wrote my own stuff (WIP) for form input validation, oldInput, authentication, CSRF prevention, etc: the stuff one takes for granted in "whole hog" frameworks like Laravel. I've made a hybrid site generator (static site gen + dynamic features via included api) out of that stack with my Simple Site Manager. That's not public yet, but Forget-Me-Not has some of those features: https://source-code.itwrx.org/ITwrxOrg/Forget-Me-Not
You might just start with a very simple SSR: just routing and serving html. Try nim SCF for templating? You may like it. I have nim, js and html all together, and due to the order in which things get compiled, it's quite useful. Karax may be great though, i've just never given it "it's day in court" yet.
For large file uploads, take a look at MummyX: https://github.com/gokr/mummyx
See examples. I just added it for fun.