Deploying Angular Universal to Azure

后端 未结 3 1247
温柔的废话
温柔的废话 2020-12-06 15:01

I have an application which I have managed to convert to Angular Universal (at my clients request). I ran my application by using the command npm run serve:ssr

3条回答
  •  鱼传尺愫
    2020-12-06 15:44

    This is mine and it works

    pool:
      vmImage: 'Ubuntu 16.04'
    
    steps:
    - task: NodeTool@0
      inputs:
        versionSpec: '8.x'
      displayName: 'Install Node.js'
    
    - script: |
        npm install -g @angular/cli
        npm install
        ng build --prod
      displayName: 'npm install and build'
    
    - task: AzureRmWebAppDeployment@3
      inputs:
        azureSubscription: 'Azure CBW Dev'
        WebAppName: 'WebDev'
        Package: '$(System.DefaultWorkingDirectory)/dist'
        GenerateWebConfig: false
        WebConfigParameters: '-Handler iisnode -NodeStartFile server.js -appType node'
    

提交回复
热议问题