Based on:
Changes:
TypeScript
Docker for ElasticSearch engine
Server
Client
Data
git clone https://github.com/diberry/elastic-search-express
cd elastic-search-express
- move into directory just creatednpm install
to install dependenciesIf you don't have an ElasticSearch server yet, you can use it from a Docker container.
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.8.1
to bring image down to local computerdocker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.1
to start containerdocker ps
to see if container is runningThis is a one-time action to load city list into ElasticSearch index.
npm run load_data
npm run prebuild
to prep directoriesnpm run build
to transpile typescript into javascript into /dist
foldernpm run open
to open browser to http://localhost:3001
npm run start
npm run start:all:again
- assumes data is loaded and you just need to prebuilt, build, start, and open in browserhttp://localhost:3001/?search=a
- all cities beginning with the letter aWhen you query, there is no visual indicator blocking UI - just wait...