---
title: "Discussion on \"Dealing with a database with Next.js API routes\" | Hashnode"
description: "Discussion on \"Dealing with a database with Next.js API routes\". With Next API routes serverless functions become much more accessible. But in a serverless world, maintaining a connection with a database isn't achieved in the same way. \nHow did this work before?\nPreviously we may have provisioned, maintained and b..."
url: "https://hashnode.com/posts/dealing-with-a-database-with-nextjs-api-routes/5f85427794b1323900e0e007"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Dealing with a database with Next.js API routes](https://h.kevincunningham.co.uk/dealing-with-a-database-with-nextjs-api-routes?utm_source=hashnode&utm_medium=feed)

With Next API routes serverless functions become much more accessible. But in a serverless world, maintaining a connection with a database isn't achieved in the same way. How did this work before? Previously we may have provisioned, maintained and b...

Oct 13, 2020 · 3 min read · h.kevincunningham.co.uk  
Updated Oct 25, 2020  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#apis](https://hashnode.com/tag/apis)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Kevin Cunningham](https://hashnode.com/@dolearning)

@dolearning · Brighton, UK

  
[View profile](https://hashnode.com/@dolearning)

Hey 👋🏻 ! I'm Kevin, a full-stack developer running a digital prototyping company with my business partner called Spin Up . When I'm not consulting and building for clients, I'm writing content here, curating my newsletter or creating videos . Outside of work, I enjoy handing out with my wife and sons - camping, hiking and kayaking or just curling up with a good book.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
