Welcome to MaMoDaR’s documentation!¶
Installation¶
The DataLinker can be installed on Linux, Windows and macOS.
The code is written in Java and Angular.
An installation of the DataLinker contains of three parts:
- A frontend with the webserver (written in Angular)
- A backend (written in Java)
- A Postgres database to store the content, which is generated by the users of your DataLinker.
This chapter shows how these components are set up.
Requirements¶
- Git: (https://git-scm.com/download/win
- The database PostgreSQL https://www.postgresql.org/download/windows
- JDK version >= 11: https://adoptopenjdk.net/
- Gradle: https://gradle.org/install/#manually
- Node.js: https://nodejs.org/en/
- We recommend Visual Studio Code as editor: https://code.visualstudio.com/
- A RDMO server:
- Description: https://rdmorganiser.github.io/
- Documentation: https://rdmo.readthedocs.io/en/latest/
- A token for the communication between RDMO and the DataLinker (https://rdmo.readthedocs.io/en/latest/administration/api.html?highlight=token#authentication)
Set Up¶
Create a PostgreSQL database¶
- Start a shell (cmd.exe)
- Navigate to your PostgreSQL installation path $postgres (i.e. C:\[USERPATH]\bin\pgsql)
- Go into the bin subdirectory (cd bin)
- Create a data directory (mkdir data)
- Start PostgreSQL pg_ctl.exe start -D “C:\[USERPATH]\bin\pgsql\data”
- Create the mamodar database createdb.exe mamodar
Set-Up¶
- Start Visual Studio Code
- Install two Extensions (fifth icon on the left bar): 2.1 Gradle Tasks (richardwillis.vscode-gradle) 2.1 npm (eg2.vscode-npm-script)
- Update server\application.properties 3.1. Fill in spring.datasource.username and spring.datasource.password using the PostgreSQL data 3.2. Update rdmo.token and rdmo.url to point to a previously setup RDMO server
- In Source Control (third icon on the left bar) 4.1. Clone repository: https://github.com/cuehs/mamodar.git 4.2. Select a local folder to clone code to (no server!) 4.3. Open folder in Visual Studio Code
- Go to Terminal, Run task: npm: build -web
Run project¶
- Start database (if not started already) 1.1. Start a shell (cmd.exe) 1.2. Navigate to your PostgreSQL installation path (i.e. C:\[USERPATH]\bin\pgsql) 1.3. Start PostgreSQL pg_ctl.exe start -D “C:\[USERPATH]\bin\pgsql\data”
- Start backend 2.1. In Visual Studio Code: Got to Terminal in the Taskbar at the top 2.2. Run task: gradle:server:bootRun
- Start frontend 3.1. In Visual Studio Code: Got to Terminal in the Taskbar at the top 3.2. Run task: npm: start -web
- Open a browser at http://localhost:4200/