serving the solutions day and night

Pages

Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, June 27, 2025

Deploy Node/React/Next.js application to Azure App Service

 To deploy your Next.js dashboard (with App Router) to Azure App Service, follow these steps. 

Azure supports Next.js out-of-the-box with static and server-rendered content, including middleware.

microsoft/copilot-metrics-dashboard

>>C:\copilot-metrics-dashboard\src\dashboard>

1. Prepare Your App for Azure, Ensure your app is ready:

package.json must have a build and start script:

{

"scripts": { "dev": "next dev", "build": "next build", "start": "next start" } }

You're using App Router (e.g., app/page.tsx), so next build will generate both static and server-rendered routes.

2. Create Production Build (Locally or via CI), run through VSC

npm install

npm run build

npm start - This confirms your app runs as a production server with next start.

Make sure the build completes successfully.