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
- 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.
- 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.
- When the download is completed, open the Command Prompt on the computer by typing cmd in the windows search bar.
- 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.
- 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.
- 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.
- 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.
- 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.
- When you downloaded the ZIP file extract the contents to a folder of your choosing.
- Navigate to Bin folder and open "standalone.ps1". This will install wildfly on your system
- 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).
- After you have installed maven open Intelij and load the project.
- When you have, the project loaded go to Run in the top bar and press "Edit configurations..".
- This will open the Run/Debug configuration window. Press the + on the top left of the popup.
- Once you click on the plus it will give a dropdown menu.
Choose JBoss/WildFly server -> LocalJboss/WildFly server -> Local.
- Now we must tell WildFly what file it needs to run. Scroll all the way down to "Before Launch" and press the plus there.
- 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".
- After which you will need to do the same in the "Development" tab. Press the + button to add and choose "Artifact".
- And choose the "regterschotracing:war" as artifact. And press "OK".
- Finally hit "Apply" and "OK". Now you have successfully added WildFly to the project.
Maven installation.
- Download maven from the link below.
https://maven.apache.org/download.cgiZou dit nog even apart in een kopje neerzetten
- Extract the contents of the downloaded Maven folder to the program files folder. Afbeeldingen zijn heel klein
- 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.
- 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.
- This will open a new window. Press the "Environment Variables" button on the bottom right of the window.
- This will once again open new window. Within this window, press the "New…" button.
- 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".
- 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.
- 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.