forked from KEMT/zpwiki
		
	Update 'pages/students/2016/jan_holp/dp2021/web_api.md'
This commit is contained in:
		
							parent
							
								
									86d7979ec2
								
							
						
					
					
						commit
						7e7ed50809
					
				@ -4,4 +4,28 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[Návod na instalaciu ES- oficialna stranka ](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)
 | 
					[Návod na instalaciu ES- oficialna stranka ](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**2.**
 | 
					**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ť 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user