3 ms·
Can someone explain the advantages of using nextjs serverless?
by cjonas 5y ago
Can someone explain the advantages of using nextjs serverless?
- cjonas 5y agoSorry to clarify... I understand the benefits of serverless, but what does nextjs add beyond just built in routing. Seems like most of it's benefits are part of the server
- k__ 5y agoAnd the "server" is Lambda, I think?
- cjonas 5y agoI assumed it was using the "export" but that makes sense
- creativedg 5y agoAll frontend is in "export" mode, made in static. So, no dynamic server needed to run the frontend, 100% compatible with any static hosting like Cloudflare page. For the backend, it uses AWS lambda with API gateway and protected by AWS Cognito for private route.
- k__ 5y agoBut Next SSR should work on Lambda, right?
- creativedg 5y agoI know it possible but I've never tried it.
- cutler 5y agoServer-side rendering (SSR) is an ass-backwards attempt to recover what is lost when you go all-in on the SPA approach. SPA buggers-up SEO, navigation and history so what's the answer - duplicate the "page" on the server. Why not just render on the server to begin with and spice-up the front with JS as needed a la Phoenix Live View (Elixir), Laravel Livewire and Rails Hotwire?