Awesome
Exercise 1
We currently have a monolithic application called main-application
it is using angular routing to load in a
checkout page. We want to make a new checkout service which has a different view and different logic. It should be
possible to deploy the services separate from each other. In this exercise we are going to integrate the new
service using angular templates which are ajax'ed by angular by default.
A load balancer/reverse proxy has to be configured to ensure both service run on the same port. Load balancers can do url rewriting as well.
- Run
npm install
inmain-application/
andproxy/
- Run
npm start
in main-application - Browse to the clientside checkout tab on
localhost:3000
- Create a server serving an angular controller and a template (tip: look at the default placeholder, use
nws
to make a simple web server:npm install -g nws
) - Edit
proxy/index.js
to ensure both application are running on the same port. It might be needed to do url rewriting. - Run the proxy with
npm start
inproxy/
NOTE that the server will reload automatically when index.js is changed. - See the results on
localhost:5000
- (optional) update the load balancer to load in a service from a different participant.
Exercise 3
We realised that we need to integrate the checkout page using server side integration. We are going to use compoxure to do this.
- Add a compoxure include statement on the serverside checkout page at './main-application/app/checkout-server/checkout.html'
- Configure compoxure in
compoxure-server/config.json
- Make sure redis is running
- Start compoxure by running
npm start
incompoxure-server/
. - See the results on
localhost:5000
- (optional) update the include tag to load in a service from a different participant.