Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Busk committed Jan 10, 2025
1 parent a2f68c7 commit 8dbcf7c
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 14 deletions.
86 changes: 74 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The POSSIBLE-X Portal is the centralized landing page for interacting with the POSSIBLE-X Dataspace.

It consists of three different parts:

* The main page which is the landing page and links to other pages.
* The registration page for registering new participants.
* An administrative page to manage registration requests.
Expand All @@ -18,6 +19,7 @@ The repository is structured as a Gradle multi-project build.
(...)
├── libs.versions.toml # configuration file of version catalog for dependencies
├── settings.gradle.kts # root project settings
├── build.gradle.kts # root build file
├── buildSrc/ # shared build configuration
├── frontend/ # Angular frontend code for the GUI
│ └── build.gradle.kts # build file for the Angular frontend
Expand All @@ -40,42 +42,102 @@ Afterwards they can be found at
frontend/src/app/services/mgnt/api/backend.ts
```

## Build
## Build Backend

If you only want to build the project, you can run
If you only want to build the backend, you can run

```
./gradlew build
./gradlew buildBackend
```

after which the built jar can be found at `backend/build/libs/backend-x.y.z.jar`

## Run Portal Backend (currently including frontend)
## Run Backend

Through gradle:

```
./gradlew bootRun
./gradlew startBackend
```

Running a specific configuration:

E.g. for local portal:

```
./gradlew startBackend -PactiveProfile=local
```

Alternatively running the jar directly (if built previously):

```
java -jar backend/build/libs/backend-x.y.z.jar
java -jar backend/build/libs/backend-x.y.z.jar --spring.profiles.active=-local
```

Once the service is running, you can access it at e.g. http://localhost:8088/ (depending on the used configuration).
Once the service is running, you can access it at http://localhost:8088/.

The OpenAPI documentation can be found at http://localhost:8088/swagger-ui.html .

## Run Portal Frontend
## Build Frontend

If you only want to build the frontend, you can run

```
./gradlew buildFrontend
```

after which the built frontend can be found at `frontend/build/resources/`.

## Run Frontend

Through gradle:

```
./gradlew startFrontend
```

Running a specific configuration:

E.g. for local portal:

Consumer (local testing):
```
./gradlew startFrontend -PactiveProfile=local
```

Alternatively running with npm directly:

```
npm --prefix frontend/ run ng -- serve --configuration local --port 4208
```

Once the service is running, you can access it at http://localhost:4208/.

## Run Full Application (Frontend and Backend)

In addition to running the frontend and backend individually, there is also a gradle task for running both in parallel.
Note that when the app is started through this task, the IntelliJ debugger will not be able to attach to the backend and
hence won't stop at breakpoints.
Through gradle:

```
cd frontend/
npm start
./gradlew startFull
```

Once the service is running, you can access it at e.g. http://localhost:4300/ (depending on the used configuration).
Running a specific configuration:

E.g. for local portal:

```
./gradlew startFull -PactiveProfile=local
```

## Killing orphaned processes

If for any reason the application is not shut down properly, the following command can be used to kill a service that is
running on the specified port:

```
sudo fuser -k 8088/tcp
```

where 8088 can be replaced with any other port.
5 changes: 3 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from the central DAPS server for the new dataspace participant.
If you only want to build the project, you can go to the root of the repository and run

```
./gradlew build
./gradlew buildBackend
```

after which the built jar can be found at `backend/build/libs/backend-x.y.z.jar`.
Expand All @@ -20,6 +20,7 @@ after which the built jar can be found at `backend/build/libs/backend-x.y.z.jar`

The following environment variables can be set as needed.
Replace the right hand side with the actual values.

```
export SDCREATIONWIZARDAPI_BASEURL="SD Creation Wizard API base URL"
export DAPSSERVER_BASEURL="DAPS Server base URL"
Expand All @@ -31,7 +32,7 @@ export SPRING_DATASOURCE_PASSWORD="Datasource Password"
Through gradle:

```
./gradlew bootRun
./gradlew startBackend
```

Alternatively running the jar directly (if built previously):
Expand Down

0 comments on commit 8dbcf7c

Please sign in to comment.