Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ioana-amariei/easylearn

 
 

Repository files navigation

easylearn

Introduction

Web application that provides a training ground for programmers, similar to infoarena, pbinfo, or .campion. The application exposes a set of problems for which submissions can be sent in several programming languages (i.e., Java, C++, and Python). The platform evaluates the submissions against a battery of tests. The application also enables the addition of new problems. The Angular front-end accessed the functionality exposed by the Java back-end using an HTTP API.

Tech: Java, Spring, MySQL, Swagger

Development notes

You can use the IDE of your choice. Whenever submitting changes to the repository make sure that you don't include files that are specific to your operating system or IDE (e.g., files generated by Eclipse, files generated by IntelliJ, etc).

Project structure

Prerequisites

  1. Make sure you have the jdk installed on your system.
  2. If you receive a "Gradle does not find tools.jar" or similar error, than make sure that the JAVA_HOME path variable is set to the location of your jdk installation: https://stackoverflow.com/questions/11345193/gradle-does-not-find-tools-jar (example for Windows); only follow the instructions from the first screen capture.

Importing the project in IntelliJ IDEA

  1. Open Intellij IDEA
  2. File -> Open
  3. Navigate to the base directory of the project/repository
  4. Select the build.gradle file from this directory and then OK
  5. Select Open as Project
  6. Check the Use auto-import option
  7. If you receive an error that specifies that the project is already created in the directory, delete the directory/repository and clone the repository again. This will delete any changes that were made locally and were not pushed to GitHub, you will loose them.

Development workflow

  1. The first time you should clone the project locally. This step should be skipped in future iterations.
  2. Pull the latest version from github locally before adding any other code. This should be done each time.
  3. Add the code to the project.
  4. Build the project to make sure that your changes are successfully integrated (see the next section). If any errors are displayed you should resolve them.
  5. If the build is successful, then run the project (see the next section).
  6. Test your changes manually (e.g., verify that the changes work as expected on the endpoint, UI, etc).
  7. If your changes work as expected make a new commit that includes the files.
  8. Pull locally any changes that might be submitted to the repository in the meantime and merge them manually if necessary (most of the times git will handle them automatically).
  9. Push the changes to github.

Building the project

In order to build the project, position yourself in the root directory of the project and use the following command depending on your operating system:

  • Windows: gradlew.bat build
  • Linux: ./gradlew build

Running the project

In order to run the project, position yourself in the root directory of the project and use the following command depending on your operating system:

  • Windows: gradlew.bat bootRun
  • Linux: ./gradlew bootRun
  • The application will start at the port specified in the application.properties file, which is located in the resources folder. The current application port is set to 8100. After starting the project access it: http://localhost:8100/
  • The HTTP API exposed by the application can be accessed manually at the following endpoint: http://localhost:8100/swagger-ui.html

Documentation

Troubleshooting

Setting the working directory:

1.Open the "Run/Debug Configurations" menu. 
(To open "Run/Debug Configurations" window, 
click the drop down menu left of the "Run" button 
in Intellij and select "Edit configurations...");
2.Select from the list on the right the target.
3.Set the "Working directory: " as the local 
ABSOLUTE path of the project root.

If the CompilerTest fails with: "Run error: javac: file not found: ":

1.Check that you do have the files and directories 
at the paths specified in the @SetUp.
2.If you do have them, change the working directory of the test
following the steps in "Selecting the working directory".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 57.9%
  • TypeScript 21.7%
  • HTML 10.3%
  • SCSS 9.6%
  • JavaScript 0.5%