The back end REST API for the BC Vending Machines app. This uses Spring Boot 2.6.4 alongside Java 8. The production build is deployed on Heroku at bcvm.herokuapp.com. The Angular front end is available in the master branch of the BCVM repo.
For development, use api-develop
. api-develop
includes "Local configuration" in api/src/main/resources/application.yaml
and a Captcha class. For production, it must be commented out, and it uses System.getenv("SECRET_KEY") instead of the class.
IntelliJ IDEA was used to create and maintain this API. To run the server, check out the api-develop
branch in a Java IDE and run it that way. Or, run mvn spring-boot:run
. This requires some setup via installing Maven, cd'ing into the directory where pom.xml is located in, and running mvn spring-boot:run
. This may help.
Install PostgreSQL here. A default option is starting it when your PC boots up. This initializes the connection. You can also start it in Windows Services. Locally, the project intends to connect to a Postgres database called "postgres" that runs on the default port 5432. You may need to populate the database with the schema.sql
followed by the data.sql
SQL file in api/src/main/resources
.
If you're not just testing endpoints, you will need to set up the front end, so check out the README in the master branch.