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

Run samplestack as 3-tier app #713

Open
rvirdiz opened this issue Oct 26, 2017 · 2 comments
Open

Run samplestack as 3-tier app #713

rvirdiz opened this issue Oct 26, 2017 · 2 comments

Comments

@rvirdiz
Copy link

rvirdiz commented Oct 26, 2017

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.

@aditya-
Copy link

aditya- commented Oct 26, 2017

@laquereric @grechaw @team Can you kindly look into this. Thanks :-)

@aditya-
Copy link

aditya- commented Oct 26, 2017

Just want to understand how to make the connection between Front end node and Middle tier java spring server node when both are hosted separately, kindly please let us know where to make this configuration (for establishing the connection between frontend and Middle tier). Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants