GithubHelp home page GithubHelp logo

elastic-search-express's Introduction

Run Web site with search capabilities

Based on:

Changes:

  • TypeScript

  • Docker for ElasticSearch engine

  • Server

    • Elastic search from Docker container
    • Express JS
  • Client

    • Vue (sorta)
  • Data

    • city list in /Data directory

Requirements

Get Code

  • Clone or download this repository
    • git clone https://github.com/diberry/elastic-search-express
  • cd elastic-search-express - move into directory just created
  • npm install to install dependencies

Start ElasticSearch as local docker container

If 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 computer
  • docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.1 to start container
  • docker ps to see if container is running

Verify ElasticSearch is running with cURL CLI

  • curl -X GET "localhost:9200/_cat/nodes?v&pretty"

Load city list into index

This is a one-time action to load city list into ElasticSearch index.

  • npm run load_data

Build website code

  • npm run prebuild to prep directories
  • npm run build to transpile typescript into javascript into /dist folder

Run website code

Run process over and over

  • npm run start:all:again - assumes data is loaded and you just need to prebuilt, build, start, and open in browser

Website queries

  • http://localhost:3001/?search=a - all cities beginning with the letter a

Known issues

When you query, there is no visual indicator blocking UI - just wait...

elastic-search-express's People

Contributors

diberry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.