From 7e7ed5080937f8801f5e2308b488d67e36d323b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Holp?= Date: Fri, 24 Apr 2020 10:25:37 +0000 Subject: [PATCH] Update 'pages/students/2016/jan_holp/dp2021/web_api.md' --- .../students/2016/jan_holp/dp2021/web_api.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pages/students/2016/jan_holp/dp2021/web_api.md b/pages/students/2016/jan_holp/dp2021/web_api.md index ee938f4f6d..644e286c01 100644 --- a/pages/students/2016/jan_holp/dp2021/web_api.md +++ b/pages/students/2016/jan_holp/dp2021/web_api.md @@ -4,4 +4,28 @@ [Návod na instalaciu ES- oficialna stranka ](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html) -**2.** \ No newline at end of file +**2.** vytvoríme svoj vlastný priečinok v Documents alebo skopirujeme skweb.zip a extrahujeme + +**3.** v priečinku skweb spustime niekolko príkazov + + npm init // vytvori subor package.json, kt sa tam uz nachadza tak ho prepise + + npm install express body-parser elasticsearch // nainstaluje kniznice + + sudo -i service elasticsearch start // zapneme ES + +**4.** Zaindexujeme databazu + + nodejs data.js //nacita subor a zaindexuje databazu + + nodejs idnex.js //najlepsie otvorit v novom okne, musi bezat aby aplikacia fungovala + +**5.** Otvorime prehliadač a zadáme http://localhost:3001/ + +**6.** Môžeme vyhľadávať + +![ukazka](http://) + + + +