Home > Software engineering >  Node Express Webpack API Release to Azure Dev Ops
Node Express Webpack API Release to Azure Dev Ops

Time:01-13

I'm trying to release my project using Nodejs Express on Azure Dev Ops and Deploy on Release, but when I try to open the link. I'm getting a "The page cannot be displayed because an internal server error has occurred." error.

YAML: pool: name: Azure Pipelines steps:

  • task: NodeTool@0 displayName: 'Use Node 14.x' inputs: versionSpec: 14.x

  • task: Npm@1 displayName: 'npm install' inputs: verbose: false

  • task: Npm@1 displayName: 'npm custom' inputs: command: custom verbose: false customCommand: 'run build'

  • task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' inputs: PathtoPublish: '$(System.DefaultWorkingDirectory)'

Package Script Package Script

Webpack.config Webpack.config

and on Azure Pipeline Azure Pipeline the default setting of npm install and build

and on Azure Release Realease

All are working fine, on the build and release.

Blank Page blank

I'm starting to guess the problem was from the azure portal, or on the way it was setup. Because I didn't create the portal. I'm only the Contributor.

Please help clarify this.

I try to build all files on SCM \wwwroot

wwwroot

CodePudding user response:

  • Make sure the index.js file is deployed to your azure app service

  • As you have some issues with your existing application Create the new application using this MS-DOC

  • Sign into Azure Pipelines. Your browser will go to to display your Azure DevOps dashboard.

  • Create New pipeline under the pipeline's menu of your project

  • Select GitHub as the source code location.

  • If the code is placed in GitHub, then login with Git Creds

  • When the list of repositories appears, select your sample Node.js repository.

  • Azure Pipelines analyzes the code in your repository and automatically gives a Node.js template for your pipeline. Select this template.

  • Azure Pipelines will automatically generates a YAML file in your pipeline. Click on Save and Run > Commit Directly to Master Branch and then choose Save ad Run again.

A new run begins. Wait for the run to complete.

  • Related