hcp-uw/algo-visualizer

Research Springboot

Closed this issue · 1 comments

Research how springboot can be used in our web app.

https://spring.io/guides/tutorials/react-and-spring-data-rest/

Spring boot is a Java framework for building stand alone applications. Spring boot offers a REST API and you can use curl to retrieve data from Java backend in a JSON format. Below is sample code of JSON data retrieved using curl

Screen Shot 2021-11-05 at 11 24 38 PM

The following is sample React code using the API to retrieve data. Properties (props) are values passed to a component that do not change (like parameters). States are data the component handles that can change. In this class, the state is the employees, which is populated with data retrieved from the server through the API call
client({method: 'GET', path: '/api/employees'}).done(response =>

Screen Shot 2021-11-05 at 11 26 06 PM