Documentation:
Rules |
Email |
Gate & Authentication |
Hashing |
PlantService |
Sessions |
SQL Sanitization |
TimeService |
Model Collection
The PlantIQ backend provides the core functionality to both the frontend and smart home hubs and sensors, it serves as the central glue point that brings the experiance together. This application is written using Java 17 and utlizes Spring Boot to provide its core functionality for interacting with web requests. This app is designed to run on Microsoft Azure web services and should be used only as a backend for clients to connect to.
This Application should be run on Java version 17 or higher.
To access the backend for testing or development purposes we recomend the use the HTTP client Insomnia https://insomnia.rest/
Microsoft's azure platform provides a number of streamlined ways to upload and run your Java Spring Boot application, for this example i will show you how to upload it via sFTP and set the jar.
Login to Microsoft Azure and select create a new resource.
Select "Web App"
Name your new web app, in the case of this project we would use PlantIQ REST API but in the example screenshot I use MySpringApp.
Now it's important to select the most appropriate Java version, our project is compatible with Java 17 and that is the most recent provided so select that from the drop-down list.
Lastly select the region that is most appropriate for you.
Review the setting you have selected and click create.
Microsoft Azure may take a few minutes to deploy your application, wait untill it confirms its completed.
Once deployed click into the Application, you will see an overview from this screen.
We can now connect via FTP, on the left hand side menu select "Deployment Center"
Once the deployment center opens select FTP details from its menu, copy these details into your FTP client of choice, Our recommendation is File Zilla https://filezilla-project.org/.
Once connected you will see the current folder is called wwwroot and the hostingstart.html file present. This folder is where we upload our runnable builds to, to perform an upload drag the file in and File Zilla will upload it.
Once the file is uploaded close File Zilla and from the left and menu select "Configuration" then from its menu select "General Settings".
This will now provide you with the java startup command, here we need to java the following,
replacing MyJar.jar with the jar name including the extension,
java -jar /home/site/wwwroot/MyJar.jar
Now we have uploaded our jar and set it as the start-up command, navigate back to the overview screen and click the restart button Azure will now use the jar and serve your spring boot application.
If at any point you wish to track the restart and troubleshoot errors simply use the live log provided the "Log Stream" option on the left hand side menu.
Sucess! the application is now deployed to Microsoft Azure!