Nano-web
Infrastructure
web server
SHOW HN2024
How HN took it
3 positive, 14 neutral or asking, 0 mixed, 13 critical, out of 30 comments about the project. Thread score -0.35.
Performance: 1 for, 6 againstIdea: 2 for, 3 againstExecution: 0 for, 3 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Readable C code
From 1 comment
actually readable C. kudos
cdaringe on HN
Objections
SPA mode returns 200 for missing routes, which breaks 404 semantics and DAST scans
From 3 comments
> SPA_MODE when set to 1 404 request will return /public/index.html as a 200. oof, as someone who frequently has to run DAST tools, returning a 200 for something that should be a…
Sohcahtoa82 on HNIf I make a typo and get a 200 for some url that doesn't actually exist, my browser will now happily suggest that url when I'm typing something in the future. Is there a benefit…
eddd-ddde on HNYou only have to serve a 200 and the index for valid routes to have frontend routing working. The complaint is serving a 200 for invalid routes, which breaks all kinds of things…
shkkmo on HN
Returning 200 for every route is poor practice for SPAs
From 1 comment
> What's available now that superceds them? The mostly same stuff as before, but slightly better. SPAs were a fad that got very popular, but they were generally a poor solution…
shkkmo on HN
Binary size and image size larger than minimal alternatives
From 1 comment
If this is the nano version then let me share the pico alternatives with you: * BusyBox httpd [1] * thttpd [2] * Lwan Web Server [3] * gatling [4] I built and maintain a super…
lipanski on HN
Requests
Add an option to return 404 for unknown routes
From 1 comment
> SPA mode to service 404s as index (200) to support client side routing. Be careful: SPAs can handle 404s client-side. All you need to do is continue to return the 404 result…
gwbas1c on HN
Questions
How the server knows which SPA routes are valid
From 1 comment
But if it's an SPA, how else would you handle this case? How is the webserver supposed to know in advance which URLs the SPA is able to handle?
__jonas on HN
Whether CloudFront really lacks index page support in subdirectories
From 2 comments
Can you elaborate "CloudFront doesn't support index pages in subdirectories" and how does it not work? I'm not much into them these days but if I remember correctly in the 4-5…
Brajeshwar on HNWhen was this added? I recall several years ago having to do this with edge lambdas. IE the it would happily resolve / to /index.html would be fine, but if you wanted to do…
antihero on HN
Alternatives named
nginx
From 2 comments
how about civetweb? or lighttpd? both are well known and field tested, light weight and as portable as you need. what are the different features needed for serving SPA comparing…
synergy20 on HNNeat idea! We did a blog post around just using nginx for something similar. Which is to say NGINX serving SPA.…
jazzjazz on HN
BusyBox httpd, thttpd, lwan, gatling
From 1 comment
If this is the nano version then let me share the pico alternatives with you: * BusyBox httpd [1] * thttpd [2] * Lwan Web Server [3] * gatling [4] I built and maintain a super…
lipanski on HN
redbean
From 1 comment
I like the idea! Have you seen redbean, which is a universal binary and serves static files from a zipfile? How does this compare to that? Honestly, I think that the current Web…
EGreg on HN
Caddy
From 1 comment
> How are you implementing SPAs in a way that you can't return a 404? Not specifically me, but a lot of SPAs have their own routing. So you would go to ```…
__jonas on HN