How to access Azure SQL Database which is connected with Azure Static Web apps from Next.js?

Jihoo Byeon 0 Reputation points
2024-05-29T13:29:47.4733333+00:00

Hello, I deployed a Next.js app to Azure Static Web apps, and connected to Azure SQL Server via Azure Portal.

and I tried to use it as explained at https://learn.microsoft.com/ko-kr/azure/static-web-apps/database-azure-sql?tabs=bash&pivots=static-web-apps-rest, but the app fails to fetch from /data-api/ path, both on client and server side.

It seems to collide with Next.js routing… pages’ seems to searching for /pages/data-api/, not /data-api/.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
815 questions
{count} votes