This repository contains the Seismic Search, an Earthquake Search App, a project built to learn how Elasticsearch works and how to use it in conjunction with a Node.js server to route client requests. The app enables users to search for earthquake data stored in Elasticsearch and retrieve earthquakes that match their specified criteria.
-
Clone the repository:
git clone https://github.com/PriyanshuMallick/SeismicSearch
-
Navigate to the project directory:
cd SeismicSearch
-
Install the dependencies for the client side:
cd ./client npm install
-
Install the dependencies for the server side:
cd ../server npm install
-
Create an API key to connect with Elasticsearch
-
You can do this by either running
generateApiKeys()
orrunMeToCreateAndLogApikey()
inserver/src/create_es_api_key.ts
-
Or by creating an API Key with Kibana Interface
-
-
Create a
.env
file in the server directory referring.env.example
located in the same directory with your data. -
Start the server:
cd server npm start
-
Open a browser and go to the following link
http://localhost:3001/ingest_data/[your_index]
Example:
http://localhost:3001/ingest_data/earthquakes
Assuming your node server is running on
http://localhost:3001
-
Start the client:
cd ../client npm start
-
Access the Seismic Search app in your browser at
http://localhost:3000
- Search earthquakes based on type, magnitude, location, and date range.
- Sort the search results by ascending or descending order of magnitude.
- View detailed information about each earthquake in a user-friendly format.
This project was inspired by Lisa Jung's "Mini Beginner's Crash Course to Elasticsearch and Kibana" Season 2 playlist on YouTube. The tutorial provided a foundation for understanding Elasticsearch and implementing the search functionality in this app.
This project is licensed under the MIT License. Feel free to modify and use the code as per the terms of the license.