Skip to Content
0
Sep 02, 2020 at 03:15 PM

consuming a service of one Node.js application in other Node.js application

101 Views

Dear all,

In CAP model i have two node.js applications A and B.

requirement: i have to consume application url of A in B.

is it possible to achieve this with out hardcoding the application url of A in B and without setting up a destination in cockpit.

mta.yaml

ID: test
_schema-version: '2.1'
version: 0.0.1
  - name: A
    type: nodejs
    path: srv
    parameters:
      memory: 512M
      disk-quota: 512M
    provides:
      - name: srv_api
        properties:
          url: '${default-url}'
  
  - name: B
    type: nodejs
    path: njs_test
    parameters:
      memory: 512M
      disk-quota: 1024M
    provides:
      - name: njs_test_api
        properties:
          url: '${default-url}'

Thank you.

Pratheek.