Keep.id Training Server Application. This is the training backend server for Keep.id, mean to get engineers familiar with API and DB concepts. https://docs.google.com/document/d/1gmrSSzV4gzMEUXjU6bq57TjtAl6zrw1i61FxxzykK94/edit?usp=sharing
How to get the backend service running:
- make sure you have Java in the JAVA_HOME environment variable
- make sure you have maven (run "mvn --version" in terminal to check)
- make sure you have Java 13 JDK/JRE installed. If you wish to have multiple Java versions, look into Java Jabba, which is a Java Version Manager.
- make sure you install IntelliJ, and install these extensions under File -> Settings -> Plugins:
- google-java-format (this will help enforce Java code style)
- Save Actions (this will automatically enforce Java code style on save)
- make sure that in IntelliJ, maven auto-import is turned on (there will be a pop up usually, or just search up online on how to enable this). You may have to restart IntelliJ multiple times for it to show up
- under File -> Settings -> Other Settings -> Save Actions, check the first two boxes under General and the first two boxes under Formatting Actions. This will enforce the code style on save
- under File -> Project Structure -> Modules, set Project SDK and Project Language Level to 13. Additionally, YOU MUST SET YOUR SOURCES, TESTS, TEST RESOURCES, AND EXCLUDED FOLDERS. This step is VERY IMPORTANT, or else nothing will run. Set Source Folders as src/main, Test Source Folders as src/test, Test Resource Folders as src/test/resources, and Excluded Folders as target. Make sure Language level is set to 13. Under the Dependencies tab, make sure the Project SDK is set to 13.
- you can run tests or run App
- check logs in logs/app.log
- ALSO if you are having a Null Pointer Exception in the Mongo Config, please follow the instructions here: https://github.com/Ashald/EnvFile. We are deprecating the use of dotenv because it is interfering with our heroku deployment (also the heroku deployment doesn't see the env file anyway). Therefore, please edit the run configurations in IntelliJ at this link here: https://github.com/Ashald/EnvFile.