REST Service for POPCORN - ILIAS
alex
2025-11-17 3fce3e400fd44d3b6f345a31413e0ad2b7724107
README.md
@@ -13,6 +13,12 @@
(Theoretically it can also run on a different host but this is untested.)
### ILIAS DB Access
Globus-ILIAS-Rest needs access to the ILIAS DB.
The DB credentials are defined in the settings file `settings.$NODE_ENV.json`.
### Software
- node.js v22.x
@@ -63,7 +69,7 @@
    cd $ILIASBASEDIR
    chown -R www-data:www-data globus-ilias-rest
The copied folder contains a file named `token`. This file contains an access token wich __must be kept secret__.
The copied folder contains a file named `token`. This file contains an access token which __must be kept secret__.
The file `token` is protected by a `.htaccess` rule which prevents the webserver from reading the file.
__Make sure that this `.htaccess` Apache rule is active and prevents the file from beeing read by the webserver.__
@@ -77,7 +83,7 @@
This way Globus-ILIAS-Rest can be accessed through the same URL as the ILIAS Installation (including https).
__ATTENTION__
The service __must__ run under https. Otherwise the AUTH-TOKEN used by Globus-ILIAS-Rest is not secure.
The service __must__ run under https. Otherwise, the AUTH-TOKEN used by Globus-ILIAS-Rest is not secure.
(as of now this is given for both ILIAS installations)
##### Enable mod_proxy
@@ -105,8 +111,7 @@
## Setup
### Env und Settings
### Env
Set `NODE_ENV` env var.
E.g. in `.bashrc`.
@@ -119,14 +124,13 @@
    NODE_ENV=prod
__NODE_ENV must be set before starting the application!__
### Install files
Install the files using git.
Install Globus-ILIAS-Rest using git.
    git clone https://$USER@gitblit.minervis.com/r/globus/globus-ilias-rest.git
    cd globus-ilias-rest
@@ -223,3 +227,19 @@
    https://globusfm-dev2.minervis.com/popcorn/users?token=AUTHTOKEN
## Other
### Logs
To prevent logs from growing too big the file `$INSTALLDIR/log.log` should be included into a logrotation job.
Furthermore `pm2` also does some logging.
`pm2` logs can be cleared by running
    pm2 flush
Alternatively `pm2` logging also can be turned off (not advised).
To do this add the param `--disable-logs` when running Globus-ILIAS-Rest through `pm2`.