2017-08-15 22:51:28 +02:00
# Lighthouse - A lightning fast search for the LBRY blockchain
2017-10-16 22:26:13 +02:00
**Created by _filipnyquist_ < filip @ lbry . io > and the community!**
2017-08-15 22:51:28 +02:00
## What is Lighthouse?
>Lighthouse is a lightning-fast advanced search engine API for publications on the lbrycrd with autocomplete capabilities.
2017-12-19 22:41:11 +01:00
>The official lighthouse instance is live at https://lbryio.github.io/lighthouse/
2017-08-15 22:51:28 +02:00
## What does Lighthouse consist of?
>1. Elasticsearch as a backend db server.
2017-12-19 22:41:11 +01:00
>2. LBRYimport, an importer that imports the claims into the Elasticsearch database.
2017-08-15 22:51:28 +02:00
>3. Lighthouse API server, which serves the API and does all calculations about what to send to the end user.
2017-10-10 14:42:42 +02:00
## API Documentation
[The full API documentation ](https://lbryio.github.io/lighthouse/ )
2017-08-16 19:49:27 +02:00
2017-10-16 22:26:13 +02:00
## Running Lighthouse
### Prerequisites
* Node v8
* Yarn
* Python2.7
* [Elasticsearch ](https://www.elastic.co/downloads/elasticsearch )
>To get started you should clone the git:
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
git clone https://github.com/lbryio/lighthouse
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
>Grab the latest release of lbrycrd here:
[Download lbrycrd ](https://github.com/lbryio/lbrycrd/releases )
>Create a lbrycrd config file at ~/.lbrycrd/lbrycrd.conf which contains rpcuser,rpcpassword and rpcport. Then run lbrycrd in the background with that config file.
2017-08-16 19:49:27 +02:00
2017-12-19 22:41:11 +01:00
>Make sure elasticsearch is running and run (from the lighthouse dir):
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
./gendb.sh
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
>Install dependencies:
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
yarn install --production=false
2017-08-16 19:49:27 +02:00
```
2017-12-19 22:41:11 +01:00
>Start an instance of the decoder:
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
cd decoder & & pip install -r requirements.txt & & python decoder.py
2017-08-16 19:49:27 +02:00
```
2017-10-16 22:26:13 +02:00
>Build and run Lighthouse:
```
yarn run prod
```
>WOO! You are now up and running! You can connect to lighthouse at http://localhost:50005, api documentation is [here ](https://lbryio.github.io/lighthouse/ ).
2017-12-19 22:41:11 +01:00
Lighthouse will continue syncing in the background, usually takes 10-15 minutes before all claims are up to date in the database.
2017-08-16 19:49:27 +02:00
## License
2017-10-16 22:26:13 +02:00
MIT © [LBRYio, Filip Nyquist ](https://github.com/lbryio )