Extension to the Empower Plant UI/UX. This project was originally bootstrapped with Create React App; this Java Spring Boot backend is available with the query param &backend=springboot, [e.g.] (http://localhost:5000/?se=simon&backend=springboot).
This uses java version 8 and SpringBoot version 2.5.4 spring-boot-starter-parent?
- Set env-config/*.env with
REACT_APP_SPRINGBOOT_BACKEND=<value>
-
Set other
spring-boot/src/main/resources/application.properties
property values -
Follow steps as described in
application.properties
for Local DEV deployment XOR Cloud GCP deployment -
Put your DSN key in application.properties
Verify that the DEV section is not commented out in application.properties and values are set. The GCP section should be commented out.
spring.datasource.url=jdbc:postgresql://<server>:<port>/<database name>
server.port=8090
spring.cloud.gcp.sql.enabled=false
Run ./run.sh
Verify that the GCP section is not commented AND DEV section is commented (i.e. application.properties
should have no values for spring.datasource.url
nor server.port
).
spring.cloud.gcp.sql.enabled=true
and to deploy
mvn clean package appengine:deploy
If you get invalid authentication credentials, try running first before deploying:
gcloud auth login
All configurations are in src/main/resources/application.properties
and src/main/appengine/app.yaml
.