Wiki source code of Configuration de l'export nodejs
Last modified by Aurelie Bertrand on 2025/12/19 08:51
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{ddtoc/}} |
| 2 | |||
| 3 | ---- | ||
| 4 | |||
| |
8.1 | 5 | (% class="wikigeneratedid" %) |
| |
13.1 | 6 | The export of certain Flows (graphics), such as D3, Gantt or Open Street Map, requires the use of nodejs. |
| |
8.1 | 7 | |
| 8 | (% class="wikigeneratedid" %) | ||
| |
13.1 | 9 | To run nodejs, follow the instructions below. |
| |
8.1 | 10 | |
| |
13.1 | 11 | = Install Chromium = |
| |
6.1 | 12 | |
| |
13.1 | 13 | The nodejs export requires the Chromium browser to be installed. |
| |
6.1 | 14 | |
| |
13.1 | 15 | For installation on Ubuntu 22.04, use the following commands: |
| |
6.1 | 16 | |
| 17 | {{code}} | ||
| 18 | sudo wget "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x869689FE09306074" -O /etc/apt/trusted.gpg.d/phd-chromium.asc | ||
| 19 | echo "deb [signed-by=/etc/apt/trusted.gpg.d/phd-chromium.asc] https://freeshell.de/phd/chromium/$(lsb_release -sc) /" | sudo tee /etc/apt/sources.list.d/phd-chromium.list | ||
| 20 | sudo apt-get update | ||
| 21 | sudo snap remove chromium | ||
| 22 | sudo apt-get -y purge chromium-browser | ||
| 23 | sudo apt-get -y autoremove | ||
| 24 | sudo apt-get -y install chromium | ||
| 25 | {{/code}} | ||
| 26 | |||
| |
13.1 | 27 | = Activate the nodejs export server = |
| |
1.1 | 28 | |
| |
13.1 | 29 | 1. Edit the **system.xml **file in the **<digdash.appdata>/Enterprise Server/ddenterpriseapi/config** folder. |
| 30 | 1. Add the line: | ||
| |
1.1 | 31 | |
| |
4.1 | 32 | {{code language="batch" cssClass="notranslate"}} |
| |
2.1 | 33 | <Property key="NODEJS_EXPORT" value="true"></Property> |
| |
1.1 | 34 | {{/code}} |
| 35 | |||
| |
9.1 | 36 | (% start="3" %) |
| |
13.1 | 37 | 1. Restart the tomcat server. |
| |
1.1 | 38 | |
| |
13.1 | 39 | = Set up the nodejs server = |
| |
1.1 | 40 | |
| |
13.1 | 41 | If the tomcat ip address and port are different from the default values (localhost:8080), edit the **digdash.properties** file **.** |
| 42 | Uncomment or add the following line: | ||
| |
1.1 | 43 | |
| |
4.1 | 44 | {{code language="properties" cssClass="notranslate"}} |
| |
2.3 | 45 | ddenterpriseapi.SERVERURL=http://localhost:8080 |
| |
1.1 | 46 | {{/code}} |
| 47 | |||
| |
3.1 | 48 | (% class="box infomessage" %) |
| 49 | ((( | ||
| |
13.1 | 50 | 💡To uncomment a parameter in the digdash.properties file, delete the # character at the beginning of the line. |
| |
3.1 | 51 | ))) |
| |
10.2 | 52 | |
| |
13.1 | 53 | = Export via NodeJS multi-domain = |
| |
10.2 | 54 | |
| |
13.1 | 55 | For a multi-domain installation on the same machine, exports using NodeJS are not functional except for the default domain ("defautHost" in tomcat's server.xml). |
| |
10.2 | 56 | |
| |
13.1 | 57 | For a "classic" installation with 3 domains such as "default, rct, dev", add the following lines to the "digdash.properties" file: |
| |
10.2 | 58 | |
| |
13.1 | 59 | (% class="box infomessage" %) |
| 60 | ((( | ||
| 61 | ℹ For the "NODEJSURL" parameter, the ports must be distinct per domain on the same machine (3000 then 3001 and 3002 in the example below). They do not have to be continuous (but they do have to be free, of course). | ||
| 62 | ))) | ||
| 63 | |||
| |
12.1 | 64 | {{code language="properties"}} |
| |
11.1 | 65 | ddenterpriseapi.DDAPIFORNODEJSURL=http://localhost:8080 |
| |
10.2 | 66 | ddenterpriseapi_rct.DDAPIFORNODEJSURL=http://localhost-rct:8080 |
| 67 | ddenterpriseapi_dev.DDAPIFORNODEJSURL=http://localhost-dev:8080 | ||
| 68 | |||
| 69 | ddenterpriseapi.NODEJSURL=http://localhost:3000 | ||
| 70 | ddenterpriseapi_rct.NODEJSURL=http://localhost-rct:3001 | ||
| 71 | ddenterpriseapi_dev.NODEJSURL=http://localhost-dev:3002 | ||
| |
11.1 | 72 | {{/code}} |