This project uses Java 21
Run the following command in a terminal at the root of this repository:
./gradlew bootRun
This will start the server at http://localhost:8080/ and fill the database with two buildings and two rooms.
View all rooms:
curl http://localhost:8080/rooms
Set the current temperature of a room (change the 1 to the id of the room you want to change):
curl -X PATCH http://localhost:8080/rooms/1/currentTemperature?currentTemperature=21.5
Set the target temperature of a room (change the 1 to the id of the room you want to change):
curl -X PATCH http://localhost:8080/rooms/1/targetTemperature?targetTemperature=24.0
Setting the target temperature of a room will increase or decrease its current temperature by 0.1 degrees every second until it reaches the target temperature.
Run the following command in a terminal at the root of this repository:
./gradlew test