cancel
Showing results for 
Search instead for 
Did you mean: 

internal server error(500) after Deploying full stack cap project using mta on cloudFoundary

Dipnesh
Explorer
0 Kudos
144

Hello community ,i have created a full stack application  then deployed my  application on cloudfoundary using commands :                                                                                                                                                               mbt build -t gen --mtar mta.tar .                                                                                                                             cf deploy gen/mta.tar .                                                                                                                                    it has successfully   deployed my application on cloudfoundary and given me three endpoints .                         my api  endpoint is working correctly but its frontend  endpoint is giving me internal server error with error code 500.

 

this is my mta.yml file code.                                                                                                                                   

_schema-version: 3.3.0
ID: Full_stack
description: A simple CAP project.
version: 1.0.0
modules:
  - name: Full_stack-srv
    type: nodejs
    path: gen/srv
    requires:
      - name: Full_stack-db
      - name: Full_stack-auth
    provides:
      - name: srv-api
        properties:
          srv-url: ${default-url}
    parameters:
      buildpack: nodejs_buildpack
      readiness-health-check-http-endpoint: /health
      readiness-health-check-type: http
    build-parameters:
      builder: npm
  - name: Full_stack-db-deployer
    type: hdb
    path: gen/db
    requires:
      - name: Full_stack-db
    parameters:
      buildpack: nodejs_buildpack
  - name: Full_stack
    type: approuter.nodejs
    path: app/router
    requires:
      - name: srv-api
        group: destinations
        properties:
          forwardAuthToken: true
          name: srv-api
          url: ~{srv-url}
      - name: Full_stack-auth
      - name: Full_stack-destination-service
        group: destinations
        properties:
          forwardAuthToken: false
          name: ui5
          url: https://ui5.sap.com
    parameters:
      disk-quota: 256M
      keep-existing-routes: true
      memory: 256M
  - name: Full_stack-app-content
    type: com.sap.application.content
    path: .
    requires:
      - name: Full_stack-repo-host
        parameters:
          content-target: true
    build-parameters:
      build-result: resources
      requires:
        - artifacts:
            - ns11project1.zip
          name: ns11project1
          target-path: resources/
  - name: ns11project1
    type: html5
    path: app/project1
    build-parameters:
      build-result: dist
      builder: custom
      commands:
        - npm install
        - npm run build:cf
      supported-platforms:
        []
resources:
  - name: Full_stack-db
    type: com.sap.xs.hdi-container
    parameters:
      service: hana
      service-plan: hdi-shared
  - name: Full_stack-auth
    type: org.cloudfoundry.managed-service
    parameters:
      config:
        tenant-mode: dedicated
        xsappname: Full_stack-${org}-${space}
      path: ./xs-security.json
      service: xsuaa
      service-plan: application
  - name: Full_stack-repo-host
    type: org.cloudfoundry.managed-service
    parameters:
      service: html5-apps-repo
      service-name: Full_stack-html5-srv
      service-plan: app-host
  - name: Full_stack-destination-service
    type: org.cloudfoundry.managed-service
    parameters:
      config:
        HTML5Runtime_enabled: true
        init_data:
          instance:
            destinations:
              - Authentication: NoAuthentication
                Name: ui5
                ProxyType: Internet
                Type: HTTP
                URL: https://ui5.sap.com
              - Authentication: NoAuthentication
                HTML5.DynamicDestination: true
                HTML5.ForwardAuthToken: true
                Name: Full_stack-srv-api
                ProxyType: Internet
                Type: HTTP
                URL: ~{srv-api/srv-url}
            existing_destinations_policy: update
        version: 1.0.0
      service: destination
      service-name: Full_stack-destination-service
      service-plan: lite
    requires:
      - name: srv-api
parameters:
  deploy_mode: html5-repo
  enable-parallel-deployments: true
build-parameters:
  before-all:
    - builder: custom
      commands:
        - npm ci
        - npx cds build --production

 

Screenshot (6).pngScreenshot (7).pngScreenshot (8).png

MioYasutake
Active Contributor
0 Kudos
@Dipnesh Do you see any errors in the approuter log? Try `cf logs Full_stack`.

Accepted Solutions (0)

Answers (0)