22
33![ cnb-cache] ( cnb-cache.svg?raw=true )
44
5+ [ ![ PHP Version] ( https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg )] ( https://php.net/ )
6+ [ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
7+ [ ![ Latest Release] ( https://img.shields.io/github/v/release/vitexsoftware/cnb-cache.svg )] ( https://github.com/vitexsoftware/cnb-cache/releases )
8+
59Store daily currency rates in SQL database for given time.
610
711Provide simple API like web interface for stored rates obtaining.
812
9- Installation
10- ------------
11-
13+ ## Installation
1214
1315``` shell
1416sudo apt install lsb-release wget apt-transport-https bzip2
@@ -21,8 +23,7 @@ sudo apt update
2123sudo apt install cnb-cache-DATABASE
2224```
2325
24- database can be ` mysql ` or ` sqlite `
25-
26+ database can be ` mysql ` or ` sqlite `
2627
2728Support the apache2 and lighthttpd web servers:
2829
@@ -40,20 +41,18 @@ And finally the cache is initialized:
4041
4142![ Initialization] ( init.png?raw=true )
4243
43-
4444Data stored in database:
4545
4646![ Database] ( db.png?raw=true )
4747
4848Final configuration is stored in ` /etc/cnb-cache/cnb-cache.env ` file
4949
50-
5150### Data Obtaining
5251
5352After installation the currencies listing is available on the ` /cnb-cache/ ` path.
5453
55- * http://localhost/cnb-cache/?currency=eur - todays EUR rate
56- * http://localhost/cnb-cache/?currency=USD&age =yesterday - yesterday $ rate
54+ * < http://localhost/cnb-cache/?currency=eur > - todays EUR rate
55+ * < http://localhost/cnb-cache/?currency=USD&when =yesterday > - yesterday $ rate
5756
5857``` json
5958{
@@ -68,3 +67,5 @@ After installation the currencies listing is available on the `/cnb-cache/` path
6867```
6968
7069The systemd-crond service is started and the cache is updated every day at 0:01 AM
70+
71+ See also:
0 commit comments