This is the backend application for GoRecipe
See here for GoRecipe Core's JavaDoc
This application relies on environment variables to store secrets, keys, and database information. The following environment variables must be set before running or testing the application. GoRecipe Core relies on a MySQL database. Before running, ensure that your MySQL database, and AWS S3 bucket are up.
Environment Variable | Description |
---|---|
RDS_HOSTNAME | the URL of the database (e.g. 127.0.0.1 or mydb.123456789012.us-east-1.rds.amazonaws.com) |
RDS_PORT | 3306 (default MySQL port) |
RDS_DB_NAME | the name of the database |
RDS_USERNAME | the database username |
RDS_PASSWORD | the database password |
AWS_ACCESS_KEY_ID | see AWS docs |
AWS_SECRET_ACCESS_KEY | |
AWS_DEFAULT_REGION | |
CLARIFAI_API_KEY | see Clarifai docs |
SPOONACULAR_API_KEY | see Spoonauclar docs |
- Download the latest release
- Run java -jar gorecipe-core-x.x.x.jar (note: Java 11 is required)
- Visit localhost:8080/swagger-ui/#/ to see API endpoints and models
- Clone this repository
- Install Maven
- Install the dependencies specified in
pom.xml
by runningmvn install
- Run the Spring Boot application by running
mvn spring-boot:run
(note: Java 11 is required) - The application will now be running at localhost:8080
- Visit localhost:8080/swagger-ui/#/ to see API endpoints and models
With the repository cloned and Maven installed, run mvn test
. The unit tests rely on JUnit and MySQL testcontainers;
Docker needs to be installed with the proper permissions for the tests to run.