[go: nahoru, domu]

Skip to content

The PlantIQ REST API provides all the core functionality to the PlantIQ ecosystem, the API is written in Java 19 with the utilization of the Spring Boot framework to streamline development. This application provides users, authentication, data logging and all accessible and usable functions to both the front-end and vManager.

Notifications You must be signed in to change notification settings

Programming-Project-SP1-2023/PlantIQ-REST-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlantIQ REST API (Backend)

Overview

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.

Java Version

This Application should be run on Java version 17 or higher.

Accessing the backend?

To access the backend for testing or development purposes we recomend the use the HTTP client Insomnia https://insomnia.rest/

How do I install this application on Microsoft Azure?

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.

Step 1)

Login to Microsoft Azure and select create a new resource.

step 1

Step 2)

Select "Web App"

step 2

Step 3)

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.

Step 3

Step 4)

Review the setting you have selected and click create.

step 4

Step 5)

Microsoft Azure may take a few minutes to deploy your application, wait untill it confirms its completed.

step 5

Step 6)

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"

step 6

Step 7)

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/.

step 7

Step 8)

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.

step 8

Step 9)

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
step 9

Step 10)

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!

About

The PlantIQ REST API provides all the core functionality to the PlantIQ ecosystem, the API is written in Java 19 with the utilization of the Spring Boot framework to streamline development. This application provides users, authentication, data logging and all accessible and usable functions to both the front-end and vManager.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •