Just bragging for a moment: you can build non trivial applications in clojure with auth and file backends and business logic in under 10k lines. I’ve done it for various employers.
I come from the Windows world (where IIS is the only web server that matters) so the idea of having to use a (reverse) proxy to (easely) support HTTPS is ludicrous to me.
It’s really easy. Here’s a trivial nginx conf to enable that:
server {
server_name api.myhost.com;
listen 80;
location / {
include proxy_params;
proxy_pass http://localhost:5000/;
}
# Certbot will put in SSL for you
}
And then you can easily get SNI-based multiple hosts on the same ‘node’ if you’d like. This lets you easily handle SSL stuff and still have whatever web-server you want bound to the local host:port to actually do the action. You can also do all the fun URL rewrite stuff up there if you’d like.
This is exactly the sort of clear, well-explained reasoning that I wish I saw any of at work. :(
This shit right here was illuminating af. I run a similar local stack except I throw in a nix build script.
It’s like a generic design doc for all backends :)
Just bragging for a moment: you can build non trivial applications in clojure with auth and file backends and business logic in under 10k lines. I’ve done it for various employers.
Mistyped, 1k lines.
I come from the Windows world (where IIS is the only web server that matters) so the idea of having to use a (reverse) proxy to (easely) support HTTPS is ludicrous to me.
IIS fills the same place as nginx in this design.
You don’t have to, but it is convenient.
It’s really easy. Here’s a trivial nginx conf to enable that:
And then you can easily get SNI-based multiple hosts on the same ‘node’ if you’d like. This lets you easily handle SSL stuff and still have whatever web-server you want bound to the local host:port to actually do the action. You can also do all the fun URL rewrite stuff up there if you’d like.
This is comprehensive af! It’s bedtime for me but I look forward to delving more into this tmrw.