Ruitenberglaan 26,
6826 CC Arnhem|

Introduction

This guide will explain how to install and run the Regterschot data log system.
The application contains two distinct parts. First, there's the web application that was made using the Angular framework. Second, the API which was made with Jakarta EE 9.

Web application

  1. To use the web application, install the Node Package Manager (NPM).

https://nodejs.org/en/download/
NPM is used to both install angular and keep the dependencies synchronised and up-to-date. It's possible download all project files manually, but that would take a lot of unneeded work and wouldn't be efficient when working in a larger team.

  1. Once NPM is installed, clone the angular project from the following page.

https://bitbucket.aimsites.nl/projects/SMAL/repos/regterschot-fe/browse
This can be done either by a browser and going to the repository, or by using a git client like Sourcetree or GitHub.

  1. When the download is completed, open the Command Prompt on the computer by typing cmd in the windows search bar.
  2. Navigate to the location where the project has been saved.

This can either be done by typing "cd" and the path to the install location, or by using the windows file explorer and going to the location where the project is saved, clicking on the file navigation path and typing in CMD there.


  1. When the command prompt is opened, type "npm install" and hit enter. This command will check the project for any dependencies and download and install any dependencies that have not been installed yet.

There is an option to update the project while a version of the API is running. For this update, use the command "npm update" in the console of the program. This will only download and update dependencies that do not exist yet.
With the install command NPM installed angular which is used to run the application. Deze zin is overbodig hier; het is compleet buiten de context. Je kunt deze zin beter in punt 5 verwerken of weglaten. Zin erna kun je denk ik ook wel weglaten
When the command is executed, it will display a progress bar, wait until everything's done.

  1. Now that the project is up-to-date, the API is ready to be run. In the same command prompt, run the command "ng serve". This will bootup a local instance of the application.


If this is the first time starting the project, it will take a couple minutes to get everything up and running. The command prompt will show when it is done compiling and the web application is running.

  1. Navigate to http://localhost:4200Ja oke nu wel over dit stukje, hoe stop ik de web applicatie. Kan mijn stekker er wel uitpleuren en wachten tot de batterij leeg is, maar dat is ook zonde van het milieu to visit the web applicationGaat niet over dit stukje, maar de footer. Er hoeft niet op elke pagina www.regterschotracing.com/ te staan.
    . If you want to stop the application press ctrl+c in de cmd window. This will stop the application.





REST-API

The installation of the API is less straightforward, requiring a bit more effort to be set up properly.
In terms of software, Java Development Kit 17 will need to be downloaded. This is an installation folder that will allow the system to run the API.Ik mis nog de installatie van de java ide
Hierbij ook de installatie van wildfly After which we will need to install WildFly, this will be used to run the API.
JDK 17: https://jdk.java.net/archive/
After installing the JDK, set the JAVA_HOME to the right installation path. Baeldung has comprehensive guide on how it can be done on a multitude of operating systems.

  1. First you have to download WildFly. This will be used to host the API. Go to https://www.wildfly.org/news/2021/10/05/WildFly25-Final-Released/ and press the highlighted "For download" text.


  1. When you downloaded the ZIP file extract the contents to a folder of your choosing.
  2. Navigate to Bin folder and open "standalone.ps1". This will install wildfly on your system
  3. Check if you have maven installed on your system by opening CMD and run command

"mvn -version". If installed it should show the current maven version. If it says that mvn isn't a valid command you have to install maven (maven installation).

  1. After you have installed maven open Intelij and load the project.


  1. When you have, the project loaded go to Run in the top bar and press "Edit configurations..".

  1. This will open the Run/Debug configuration window. Press the + on the top left of the popup.


  1. Once you click on the plus it will give a dropdown menu.

Choose JBoss/WildFly server -> LocalJboss/WildFly server -> Local.

  1. Now we must tell WildFly what file it needs to run. Scroll all the way down to "Before Launch" and press the plus there.





  1. This will open another dropdown with a lot of options. Press "Build Artifacts" and choose "regterschotracing.war" and not the exploded version. And press "Ok".

  1. After which you will need to do the same in the "Development" tab. Press the + button to add and choose "Artifact".


  1. And choose the "regterschotracing:war" as artifact. And press "OK".

  1. Finally hit "Apply" and "OK". Now you have successfully added WildFly to the project.


Maven installation.

  1. Download maven from the link below.

https://maven.apache.org/download.cgiZou dit nog even apart in een kopje neerzetten


  1. Extract the contents of the downloaded Maven folder to the program files folder. Afbeeldingen zijn heel klein


  1. Next, set the Maven system variables to use the Maven commands in Command Prompt. The variables that need to be set are M2_HOME, MAVEN_HOME and path.



To set these variables, right click on home button and then go to system.

  1. This will open the system setting window. On the right side of the screen there's a list of links to different settings. Click on the "Advanced system settings" link.


  1. This will open a new window. Press the "Environment Variables" button on the bottom right of the window.

  1. This will once again open new window. Within this window, press the "New…" button.
  2. This will create a new window that will ask for a variable name and value.

For name, insert "M2_HOME" and for value, insert "C:\Program Files\apache-maven-3.8.6". This is the path where the files were extracted in the previously downloaded maven folder. Next, press "OK".

  1. Repeat step 8, but instead of inserting "M2_MAVEN" as name, insert "MAVEN_HOME" as name. The value remains the same.

After this press "OK" again.

  1. Finally, add the Maven bin folder to the path variable. Select Path under "System variables" and press "Edit…".


This will open up a new window with all the path variables of the system.
Press "New" and paste "C:\Program Files\apache-maven-3.8.6\bin" and press the "OK" button.
After this, go back to the Command Prompt and type in "mvn -version".
If everything is done correctly it will show the current Maven version.

  • No labels