Will AWS work with Spring Boot and React? - spring

I'm trying out local development with Spring Boot and React where I run mvn spring-boot:run (this runs on http://localhost:8080) for the Spring server, then I run npm start (this runs on http://localhost:3000) for the React client. My knowledge is that React is the front facing component that clients will talk to and then Spring will be what React interacts with for back-end operations.
Will a setup like this work similarly in a AWS setup like AWS Elastic Beanstalk? I am confused because most of what I read up involves passing the .jar or .war to AWS to run Spring but how would a setup work for when React is the front facing component?
-Thanks!

You could deploy your Spring Boot Uber Jar to AWS Beanstalk then run an npm build to create your React bundled application and deploy that to AWS S3. You will need to change some app settings to point to the correct (Beanstalk) server and make sure your AWS S3 settings are correct. There are examples within AWS documentation.

Related

How do I connect my Azure frontend static web app to my Azure backend app service via endpoints?

For a learning project we've built a frontend and backend application. The frontend "application" is just a bunch of linked html/css/javascript files. The backend application is a spring boot / maven / java project with some endpoints.
When I run the backend application locally I am able to send a GET-request successfully using Postman. Now we've hosted the backend application via Azure and I have no idea how I can send a GET-request, I don't know which url to use.
After I get this to work I'd like to connect front- and backend application using these url's.
As you can run the backend application in your local environment successfully, you have to follow the below steps to configure and deploy the spring boot web app to azure app service:
In a terminal window, run the following command to configure your web app with the Azure Maven Plugin
./mvnw com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config
Then, at the Command Prompt, run this maven command and set the default configurations by typing ENTER and Confirm (Y/N) => 'y' and the configuration will gets completed.
Once you've done with the above steps, run
mvn azure-webapp:deploy to publish the web app to Azure.
Your webapp URL will be displayed in the output.
I don't know which url to use?
You can use that URL from maven console output and access the web-app.
Also Refer this SO thread to know how to deploy frontend and backend to the same app service plan.

GCP App Engine with Serverless VPC Connector doesn't work when app is deployed using mvn deploy

We have a pipeline that runs on gitlab, it builds and deploys code to App Engine, so far, so good. Recently we encoutered the need to route requests to internal hosts, which we found could be solved using a Serverless VPC Connector.
We created the connector, referenced it on app.yaml as per gcp docs, deployed the code using gcloud deploy in order to test, this worked perfectly. But, the same code, when deployed using mvn deploy from the gitlab pipeline, doesn't talk to the internal hosts. I suspect mvn deploy doesn't parse the app.yaml file correctly or at all.
Has anyone encountered this situation before?

Jhipster backend deploy to AWS Beanstalk API Call Failure

The backend can be deployed but API call is not working.
The frontend project and backend project are separated, I am trying to deploy the backend(Spring Boot) project onto AWS Beanstalk using sub-generator and everything looks fine:
I have configured the server port to 5000 Deploying a Spring Boot Application on AWS Using AWS Elastic Beanstalk
When I invoke API with Beanstalk Environment URL, it always give me 404 Not Found error.
Does anyone know how to solve this issue?

Deploy my spring boot application into google cloud computer engine

I got a query to ask you all. I am looking for guides that help me deploy my spring boot application on google cloud computer engine, I type in my instance IP address when I test my spring boot application I unable to access it in REST API.
May I know do you have any guides or steps for me to follow to deploy successfully in google cloud computing engine. Why do I need to deploy in computer engine is because I deployed my angular at it and I deploy it both it seems that my angular project being replaced by my spring boot application.
Codelabs GCP / Spring series has deployment tutorials:
https://codelabs.developers.google.com/spring/
GCP has some "Getting Started" tutorials you can use here:
https://cloud.google.com/java/docs/
where the specific one for deploying a java app to GCE is here:
https://cloud.google.com/java/docs/tutorials/bookshelf-on-compute-engine
But the basic steps are as follows:
Write your Spring app
Build your Spring app
Run / test your jar locally
Push your jar to a location in Storage
Create a startup script for your GCE instance
Create a new GCE VM which uses your startup script using Console, Deployment API, or gcloud tool
After that, you need to ensure you have the proper network rules in place to be able to access your API publicly. If you do not wish to learn how to use GCE, I would suggest you look into using App Engine instead because then you do not need to learn how to deploy and instead can concentrate on your api. Here is a guide to do that

UI application in Pivotal Cloud Foundry

I have a UI application built using Angular , Bootstrap and HTML5 which interacts with number of backend services. In order to deploy this application in PCF , should this be converted to a Spring Boot app? Or is there a way to use any of available buildpacks to deploy this UI app in PCF?
In case there is no need to deploy backend services, I would go with the cloudfoundry static buildpack.
http://docs.cloudfoundry.org/buildpacks/staticfile/index.html
Otherwise you will need to decide how you are going to deploy the backend services for this application. There are a number of buildpacks available that could be used for deploying the backend services and delivering the frontend content within the same app (one of them being, as you mentioned the java buildpack that can be used to deploy a spring boot app). Here is a list of available buildpacks:
http://docs.cloudfoundry.org/buildpacks/
Its not needed to convert your application to spring boot, but doing so will definitely make life easier for you, trust me. Once u convert ur app to a spring boot right, you can remote debug ur application by jst running ur app as a spring boot app.

Resources