By Paul Scanlon

How to use Postgres at the Edge

A closer look at how to use Neon’s serverless driver with Vercel Edge Functions.

In this post, I’d like to introduce Neon’s serverless driver which is suitable for use with Vercel Edge Functions. I’ll explain how to use it with Next.js and a free Neon serverless Postgres database.

Here’s a demo I created. I’ve called it Ping Thing.

What does Ping Thing do?

When users click Ping, the app sends a request to an Edge Function deployed on Vercel, where the geolocation data is extracted from the request and posted to a Neon database. I’ve added a 3D globe to visualise the journey and calculated some statistics about the request.

Give it a Ping and see your data journey

Hey!

Leave a reaction and let me know how I'm doing.

  • 0
  • 0
  • 0
  • 0
  • 0
Powered byNeon