Hacker News new | ask | show | jobs
by sdan 2014 days ago
Vercel basically makes frontend dev super easy. You can literally type in "vc" in your terminal (after installing their cli) and it'll build and deploy everything you have locally in seconds (think React or Nextjs, a React framework).

You can also use their serverless functions; which add "backend" functionality to your existing frontends. You can deploy these serverless functions in a bunch of languages (see docs) but personally I've used them in Nextjs's baked-in functionality of api routes to basically add an endpoint for mutating/querying to/from my DB for example.

2 comments

Front end deployment, when done correctly, is already easy. S3 + Cloudfront and done: all your static assets are globally available everywhere with good response times in all major geographic areas.
I switched from S3 + Cloudfront to Vercel, simply because it's even easier.
For being "easy" it actually is quite hard to find documentation on how to run an S3 website with CloudFront "properly". Amazon makes it very confusing to figure out that, e.g., web server mode is different than regular S3 mode. CF itself tries to get you to do the wrong thing. Plus you have to jump through hoops to make your bucket private but still give CF access to it. I was doing that wrong for years. How many multimillion dollar companies wouldn't be relevant if Amazon just fixed their freaking docs?
Where would those DBs be deployed? I mean, can vercel host DBs or do you still have to figure out a way of host them yourself?
You're supposed to use other hosted database vendor or your own database server if you need it. I don't think they offer any database service.
What’s the recommended DB host? Does the Next community have a go to?
I personally have Caprover running on a $5/month DigitalOcean droplet where I can create DBs on the fly for small projects. I normally switch to a better hosted platform for bigger projects. Heroku is also good but the free plan is 10,000 rows and the next plan is $9/m.
I don't think there's an official recommendation. Any database host will work just fine. However if you want to optimize based on location, here are the regions where Vercel hosts: https://vercel.com/docs/edge-network/regions#routing. So hosting a database in AWS in any of those regions probably makes the most sense.
I've had success with FaunaDB, simple and cheap to get started and you get a GraphQL endpoint as well as their query language (FQL).
I use Heroku; gets the job done and is simple.
Yeah, you'd have to host them yourself. So suppose you have a basic webapp with users logged in a DB:

Vercel(Frontend -> Serverless functions) -> DB