Frontend demo for django-elasticsearch-dsl-drf
Based on Book model, BookDocument and BookFrontendDocumentViewSet viewset.
From the project root directory.
Since project supports Django versions from 1.8 to 2.1, you may install any version you want.
To install latest LTS version, do:
pip install -r examples/requirements/django_1_11.txt
Since project supports Elasticsearch versions from 2.x to 6.x, you may install any version you want.
To install requirements for 6.x, do:
pip install -r examples/requirements/elastic_6x.txt
It's really easy using Docker.
To run 6.3.2 using Docker, do:
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2
docker run -p 9200:9200 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
First, create some test data:
./scripts/create_test_data.sh
Then build Elasticsearch index:
./scripts/rebuild_index.sh
Note, that you should be using NodeJS > 7.5.
Typically, you would first do:
nvm use 9
Then run the installer:
./scripts/yarn_install.sh
The following script would run the Django server which is used by the demo app.
./scripts/runserver.sh
Finally, run the React demo app:
./scripts/frontend.sh
Open http://localhost:3000 to view the frontend in the browser.