|
8 | 8 | 2. Navigate to `src/main/resources/application.properties` and add the key-values for the database connection as follows (If it doesn’t exist, create it):
|
9 | 9 |
|
10 | 10 | ```
|
11 |
| -spring.data.mongodb.uri=mongodb+srv://QuestPets:[email protected]/test |
| 11 | +spring.data.mongodb.uri= |
12 | 12 | spring.data.mongodb.database=EntitiesDB
|
13 | 13 | server.error.whitelabel.enabled=true
|
14 | 14 | ```
|
15 | 15 |
|
16 | 16 | 1. Navigate to the src/main/java/com/backend folder from a terminal
|
17 | 17 | 2. Ensure the port `8080` is free and open for the backend to use
|
18 | 18 | 3. Run the command `command_place_holder` on MacOS or `command_place_holder` on Windows
|
19 |
| - - You could use your IDE as well to run the QuestPetsApplication.java |
| 19 | + - You could use your IDE as well to run the QuestPetsApplication.java |
20 | 20 | 4. The API is accessible at `[http://localhost:8080/](http://localhost:8080/)` The root route is a test route to ensure the service is active (HelloWorld)
|
21 | 21 |
|
22 | 22 | # Testing
|
23 | 23 |
|
24 |
| -- Navigate to the `src/test/java` file and run the desired class to be tested using your IDE. |
25 |
| -- This will setup a Spring environment and establish the database connections required for the rest of the test files to work properly. |
| 24 | +- Navigate to the `src/test/java` file and run the desired class to be tested using your IDE. |
| 25 | +- This will setup a Spring environment and establish the database connections required for the rest of the test files to work properly. |
26 | 26 |
|
27 | 27 | # Contributing
|
28 | 28 |
|
29 |
| -- Open the backend directory in your IDE (not the project root folder) as otherwise your IDE may have trouble downloading the Gradle dependencies |
30 |
| -- Follow the pre-existing naming convention (camelCase) |
| 29 | +- Open the backend directory in your IDE (not the project root folder) as otherwise your IDE may have trouble downloading the Gradle dependencies |
| 30 | +- Follow the pre-existing naming convention (camelCase) |
31 | 31 |
|
32 | 32 | # Debugging
|
33 | 33 |
|
34 |
| -- An error during the run command is usually either due to the wrong java version or blocked port |
35 |
| -- Debugging information can be traced through logged messaged and following error stackTrace (LogHandler Deprecation disable) |
36 |
| -- The “Whitelabel error” / “Error handling this Response” means you are missing imports specific to Spring or have misconfigured routes in your application |
| 34 | +- An error during the run command is usually either due to the wrong java version or blocked port |
| 35 | +- Debugging information can be traced through logged messaged and following error stackTrace (LogHandler Deprecation disable) |
| 36 | +- The “Whitelabel error” / “Error handling this Response” means you are missing imports specific to Spring or have misconfigured routes in your application |
37 | 37 |
|
38 | 38 | # How It’s Designed
|
39 | 39 |
|
|
0 commit comments