This page describes the setup of a local development environment.
1. Checkout from this Repository
2. Establish an ssh Tunnel
Login to artemis.codeability-austria.uibk.ac.at via ssh (port 1022) and set up an tunnel from
- localhost:9200 (local) to 172.22.0.2:9200 (remote)
Remark: ssh-access only works in the uibk intranet.
Test it by calling
http://localhost:9200/metadata/_doc/_search?pretty
You should see some json-output with various search hits.
3. Setup local development environment
Install node.js locally (see e.g. https://phoenixnap.com/kb/install-node-js-npm-on-windows) (The following was tested with eclipse, for other SEUs (IntelliJ, Visual Code, ...) it should work with some variations)
-
Import the gitsearch project from the cloned repository into eclise
-
Start the project by selecting "Debug as ..." -> "Spring Boot App"
Remark: Ensure that the Spring Profile dev is selected in the debug configuration
-
Open a local terminal in your projects main directory
and type
npm start
this should start the test environment on http://localhost:9000/
4. Some hints on efficient debugging
- You can use standard SEU-commands to set break points in JAVA (and perhaps do hot code replacement for quick development/bug fixing)
- To debug typescript, you can use your browsers console (F12) and set breakpoints in the type script code
5. Some specifics
There is the very annoying thing that vscode throw the error:
Cannot load driver class: org.h2.Driver in spring boot application
To be able to start the application you have to comment out the scope (to make it awailable for vscode during runtime???)
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<!-- <scope>test</scope> -->
</dependency>