4 ms·
> I see a lot of new devs not want to have to think about deployment and management of systems so that is one aspect. Maybe people should rediscover the joys o
by arkh 2y ago
> I see a lot of new devs not want to have to think about deployment and management of systems so that is one aspect.
Maybe people should rediscover the joys of just FTPing files on a cheap host.
It's not like most project will have problems running on those hosts. And if it is the case scaling is one bare metal server + nginx away.
- 9rx 2y ago> Maybe people should rediscover the joys of just FTPing files on a cheap host. Trouble is that the reason we got away from that model because applications started to become so bloated by frameworks that it took ages to see them start up, thereby necessitating a bunch of hacks to see them respond in a reasonable amount of time, with that eventually evolving into services like Vercel that try to hide the hacks behind a "just upload it" service. So, first, people would have to rediscover the joys of not creating monstrosities. But in an age when someone might consider Nextjs... Good luck with that.
- littlecranky67 2y agoActually, I do exactly that and Next.js does have support for static exports. I write the SPA in React/TypeScript/Next.js and export to static html+js+css+assets. Those I can simply sftp to a target static webhost. All the logic is in a REST backend that is written in .NET/C#. Unfortunately, Next.js dials back static export support with every major release, but it is still usable to create a 100% SPA with static export.
- 9rx 2y ago> Next.js does have support for static exports. Wasn't it even originally created to produce static websites? But, man, at that point you're bringing a bulldozer (with a super uncomfortable operator's station!) to drive a nail.
- littlecranky67 2y ago> But, man, at that point you're bringing a bulldozer (with a super uncomfortable operator's station!) to drive a nail. I think I do exactly the opposite. Having no SSR but everything be statically exported allows me to get away with cheaper hosting on the backend side (the REST API is on a cheap VPS). Static exported SPA means, the user's browser does all the heavy rendering. Plus, no AI bots or search engines contribute to my server's load. Additionally, the site is fast. Not sure if you know how Next.js works, but since the initial load is already prerendered and just static html+js, it loads instantly. Then hydration happens in the background, unnoticed by the user and the actually JS takes over. JS+CSS are chunked where possible, and Nextjs employs a neat trick: It pre-loads the js+css for the next page once you mouse hover over a link - whether you click it or not. Also increaes the user-perceived speed. Plus, since all js chunks have its sha1 hash in the filename, they can be served with long caching times (even immutable, so cached forever) - once you loaded the website, recurring visits will be blazing fast. If you want to try it out, the url is https://lockmeout.online https://lockmeout.online - although I do not use a CDN and host verything on a cheap hetzner VPS - hence loading time might be higher outside europe.
- 9rx 2y ago> Having no SSR but everything be statically exported allows me to get away with cheaper hosting on the backend side Building a static website is very reasonable. Using the monstrosity that is Next.js to build a static website seems like super overkill, and I am not sure it offers a good developer experience to justify it[1]. [1] My experience with it had a need for dynamically driven pages, so it may just be that it's horrid design is only a problem once you move past static page generation.
- littlecranky67 2y agoYou confuse a static website with a statically exported webapp. The site I do and posted a link to has a user/login section with lots of interactivity. Plus, there are features like using the webcam for scan QR codes (using a wasm library to read QRcode in JS from a media stream), receiving push notifications (and be a PWA on iOS), generating customizable print cards, etc.
- qudat 2y agoI built a static site hosting platform specifically to bring back the feeling of simply copying files to a server to “deploy” https://pgs.sh https://pgs.sh