Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.

Run samplestack as 3-tier app #713

@ramanutd

Description

@ramanutd

Hi,
I was deploying the samplestack app as a 3-tier web application (as it is developed as a 3-tier app), in which middle tier was Java-Springs and browser side as AngularJS.

I followed the below approach to deploy the app:
First VM:
Installed MarkLogic 8 using AWS AMI.

Second VM:

  1. Cloned the SampleStack code on the Second VM.
  2. Now, configuring the gradle.properties file to change the MarkLogic DB Host, username and password.
  3. Then, under appserver/java-spring folder, run ./gradlew appserver
  4. Gradle builds the code and perform various tests, thus making the middle-tier up at port 8090.
    http://localhost:8090/
  5. This terminal is open with bootRun.

So, now open a new terminal on the second VM where middle-tier is running, I installed the prerequisites, then under browser folder, I run the gulp run --middle-tier=external.
It makes the gulp build for angularjs and makes the app running on the same VM on port 3000 at:
http://localhost:3000/

Now, as a 3-tier app, I want to setup db on different VM, middle-tier on different VM and Front-end also on different VM, but in this case middle-tier and browser are running on same VM on ports 8090 and 3000. Is it possible to run Angular JS browser on New VM, such that it makes RESTAPI calls to middle-tier on different VM instead running on the same VM with different terminals. Like, if there is any configuration file for this, like in case of MarkLogic on different host.

I hope, you got the question, in case you want more information please reply.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions