Trouble with async and await in api file

Author: jmcclr1

Originally Sourced from: https://stackoverflow.com/questions/71203264/trouble-with-async-and-await-in-api-file

I am following a guide to access a cloud database through a document API using js (https://www.youtube.com/watch?v=FhcCgg4pIg4). My output for the following code is stopping at the await on the find() function for membersCollection (see photo of output below). Here is my code connecting to the API:

const { createClient } = require("@astrajs/collections");

export default async function handler(req, res){
    const astraClient = await createClient({
        astraDatabaseId: process.env.ASTRA_DB_ID,
        astraDatabaseRegion: process.env.ASTRA_DB_REGION,
        applicationToken: process.env.ASTRA_DB_APPLICATION_TOKEN,
    });
    
    const membersCollection = astraClient.namespace("keyspace").collection("members");
        
    const members = await membersCollection.find({});
    res.status(200).json(members);
}

Here is the code for my website.

import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
import { useEffect, useState } from 'react';

export default function Home() {
  const [members, setMembers] = useState([]);

  useEffect(() => {
    fetch("http://localhost:3000/api/members")
      .then(response => response.json())
      .then(members => setMembers(members))
  }, []);

  return (
    <div className={styles.container}>
      <Head>
        <title>Create Next App</title>
        <meta name="description" content="Generated by create next app" />
        <link rel="icon" href="/favicon.ico" />
      </Head>

      <main className={styles.main}>
        <h1 className={styles.title}>
          Welcome to JoeHub!
        </h1>

        <ul>
          {members.map((member) => (
            <li key={member.id}>{member.name}, {member.location}, {member.github}</li>
          ))}
        </ul>
      </main>

      <footer className={styles.footer}>
        <a
          href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
          target="_blank"
          rel="noopener noreferrer"
        >
          Powered by{' '}
          <span className={styles.logo}>
            <Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
          </span>
        </a>
      </footer>
    </div>
  )
}

Here is my output on the local host: [1]: https://i.stack.imgur.com/EJSjA.png

Thanks for your help!