README.md 1.18 KB
Newer Older
Emmanuel Raviart's avatar
Emmanuel Raviart committed
1
# DFIH-UI
Emmanuel Raviart's avatar
Emmanuel Raviart committed
2

3
_Web user interface for the "Data for Financial History (DFIH)" project_
Emmanuel Raviart's avatar
Emmanuel Raviart committed
4

Emmanuel Raviart's avatar
Emmanuel Raviart committed
5
6
7
8
9
10
11
12
## Install

```bash
git clone https://gitlab.huma-num.fr/eurhisfirm/dfih-ui.git
cd dfih-ui/
```

Edit `src/server-config.js` to change database informations. Then
Emmanuel Raviart's avatar
Emmanuel Raviart committed
13
14

```bash
Emmanuel Raviart's avatar
Emmanuel Raviart committed
15
npm install
Emmanuel Raviart's avatar
Emmanuel Raviart committed
16
17
```

Emmanuel Raviart's avatar
Emmanuel Raviart committed
18
## Retrieve or generate JSON files of issuers, securities, etc
Emmanuel Raviart's avatar
Emmanuel Raviart committed
19
20
21
22
23
24
25
26
27
28

### Either retrieve JSON files from their git repository

```bash
git clone https://gitlab.huma-num.fr/eurhisfirm/dfih-open-data.git data
```

### Or generate JSON files from SQL database

```bash
29
30
31
32
33
node_modules/.bin/babel-node src/scripts/generate_issuers.js
node_modules/.bin/babel-node src/scripts/generate_stock_exchanges.js
node_modules/.bin/babel-node src/scripts/generate_securities.js
node_modules/.bin/babel-node src/scripts/generate_daily_price_lists.js
node_modules/.bin/babel-node src/scripts/generate_persons.js
34
node_modules/.bin/babel-node src/scripts/generate_descriptive_stats.js
Emmanuel Raviart's avatar
Emmanuel Raviart committed
35
36
```

37
38
39
40
41
42
43
## Create log file
```bash
touch /var/log/dfih-downloads.log
chgrp www-data /var/log/dfih-downloads.log
chmod g+w /var/log/dfih-downloads.log
```

Emmanuel Raviart's avatar
Emmanuel Raviart committed
44
45
46
## Launch server

In development mode:
Emmanuel Raviart's avatar
Emmanuel Raviart committed
47
48

```bash
Emmanuel Raviart's avatar
Emmanuel Raviart committed
49
npm run dev
Emmanuel Raviart's avatar
Emmanuel Raviart committed
50
```
Emmanuel Raviart's avatar
Emmanuel Raviart committed
51
52
53
54
55
56
57

In production mode:

```bash
npm run build
npm start
```