DEV Community

Mat Silva
Mat Silva

Posted on • Edited on

7 1 1 1 1

Anyone Else Tired of Having SSR Shoved Down Their Throats?

I Just Wanted to Deploy My Frontend

I used to love building frontends. Still do. But things have gotten complicated.

It used to be simple. You'd write your app, run npm run build, and deploy with a single command. Firebase. Now. Netlify. Whatever. It just worked. It was fast and quiet.

Then came the ✨ new new ✨

SSR. Edge functions. Full-stack frameworks. Everyone telling me I needed SSR. Or Server Components. Or ... well what do you mean you don't need SSR? Do you even server?

I just wanted to build a frontend. But now I had to set up backend tooling. Handle routing on the server. Learn yet another server framework to bust out of and do the deployment dances to get my html, js, and css up.

I didn’t ask for this. I didn’t want it. Still Don't.

So I went back. Circa 2018.

Back to the simple, yet powerful single page application. But yeah, I still needed to deploy it. So I dusted off an ole' nginx hash and cache strategy I wrote about years ago.

& turned it into a CLI called godeploy. It does what I needed:

  • Generates Nginx configs
  • Handles hashed assets for proper caching **
  • Packs everything into a Docker container

** Hosting static sites is practically free using CDNs, so why do you have to pay for bandwidth on every SSR platform for your static site?

Then I made it open source. If you want to host your own frontend using an nginx server that will beat the pants off of any SSR runtime, it's yours to do so.

But I still missed the one-command deploy.

So I built that too.

godeploy deploy
Enter fullscreen mode Exit fullscreen mode

Your app goes live at:

https://your-app.godeploy.app
Enter fullscreen mode Exit fullscreen mode

No servers to manage. No DevOps. CDN-backed. HTTPS. It's a hosted service, not open source. But it feels like the old days. One command. Done.


I built this because I was done futzing around, ejecting out of SSR frameworks and server components.

Shipping is simpler when frontend tools stay focused on the frontend.

If you want to build frontends your way, this is for you.

No pressure. I'm just shipping what I needed.

https://godeploy.app

https://github.com/matsilva/godeploy

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (8)

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli • Edited

100% I never do server side rendering.

I hit a hurdle with HighCharts, so I had to hack their vuejs library to get it to work, but that's the only issue I've had.

I hate that everyone (including vuejs themselves) writes their tutorials expecting you to do SSR.

Collapse
 
matsilva profile image
Mat Silva

react router bumming me out as they push client side router further and further into the corner... point is everyone is doing it!

Collapse
 
dotmavriq profile image
Jonatan Jansson

Yeah I mean, preach...

This article is very much down the line of the modern classic:
XML IS THE FUTURE

Things like HTMX and stuff exist and persist because YAGNI has staying power and longevity... it's one of the core approaches for sustainable development methodology afaic.

Collapse
 
matsilva profile image
Mat Silva

The classic "old is new again". That is how React was built, on something that was considered a legacy practice.

Collapse
 
aaronre16397861 profile image
Aaron Reese

Those aren't the good old days. G.o.d was when you deployed your site using FTP!
Everything ran server side. If you wanted interactivity it was an Ajax call to a PERL script via CGI.
Layout was done with tables and the only responsive consideration was VGA or SVGA.

Collapse
 
matsilva profile image
Mat Silva

Lol no doubt man, just might be a hard sell to try and make FTP cool again.

Collapse
 
stefanak-michal profile image
Michal Štefaňák

I'm propably too old. I remember times when SSR was the only way. And it worked great. Then SPA came. I still prefer SSR even when one of my open source projects is SPA.

Collapse
 
matsilva profile image
Mat Silva • Edited

Totally valid response! I bet the original SSR looked a lot different than what SSR means today in the JS ecosystem.

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay