-2

I want to create the following distributed system: Spring back-end microservices containing the domain logic, a UAA (authentication) service, a Eureka service registry/discovery, a Spring Cloud Config service, and a Zuul API gateway.

I am wondering what is the proper way of serving an Angular front-end application. At the moment I am serving it as a standalone application calling the API gateway, but I have seen other approaches like serving Angular from a Spring Boot service registered in Eureka, or serving it from the API gateway itself*. I am leaning towards the latter, as it feels more structured, since the front-end is intended to only consume the API gateway, and nothing else.

*In fact, generating a front-end app with JHipster implements this approach: it creates a webapp folder in the src/main directory of the Zuul application.

1

I don't know what proper way of doing this is, I can tell you want I don't want to do.

  1. I don't want to bring down a service/API gateway to deploy frontend.
  2. I don't want to wait for the service to start up (zuul or boot).
  3. Worry how many of instances to deploy, to handle the load.

There are things I want to do.

  1. Deploy it independently of the backend.
  2. Configure it once.
  3. Have no downtime while doing so (in the end, it's just files).

So as a result of this, I configure the frontend with services such as Amazon S3 and then remove the cache of the index.html when new version is deployed, not affecting boot/zool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.