![Logo](/empobla/earthquakeMapper/raw/master/README/images/logo.png)
A website that plots in Google Maps recent earthquakes of a place the user looks up using GeoNames Recent Earthquakes WebService.
Table of Contents
This project is a website that combines the use of both Google Maps API and GeoNames Recent Earthquakes API to show the user the biggest, most recent earthquakes that have occurred in a place that the user looks up.
The objective of this project was mainly to improve my knowledge and use of REST APIs and to be able to create an interactive website that, through the use of APIs, can provide useful information for users in a real-world scenario.
- Use of GeoNames API
- Use of GoogleMaps JavaScript and Places API
- @googlemaps/google-maps-service-js: For using Google Maps API.
- Axios: For making requests to GeoNames.
- Body-Parser: For limiting the request body payload the user can submit.
- Compression: For compressing express' requests.
- Dotenv: For handling in-app environment variables such as API keys.
- Express.js: For handling the server logic.
- Express-Rate-Limit: For limiting the amount of requests per window of time a user can make.
- Helmet: For applying server security policies such as CORS.
- Node.js: Framework used to build application.
- Pug: Templating language for frontend SSR.
To get a local copy up and running follow these simple example steps.
This project requires two Google API Keys (one for backend queries and one for frontend map rendering) and your GeoName's username.
-
Clone the repo
git clone https://github.com/empobla/earthquakeMapper.git
-
Install NPM packages
npm install
-
In the project's directory, create a
.env
file with the following keys:GEONAMES_USERNAME=<GEONAMES_USERNAME> GOOGLE_API_BACK=<GOOGLE_SERVER_API_KEY> GOOGLE_API_FRONT=<GOOGLE_CLIENT_API_KEY>
Note: Replace everything in between
<>
with your actual keys. -
Start the server in development mode!
npm run devstart
earthquakeMapper will display the top 10 earthquakes in the last 12 months found in the world initially. If any earthquake point is selected, it will display it's date, time, depth, and magnitude as well. In addition, you can search for places, prompting earthquakeMapper to update it's map and show you the top 10 strongest earthquakes on the place you selected in the last 12 months.
This project is property of Emilio Popovits Blake. All rights are reserved. Modification or redistribution of this code must have explicit consent from the owner.
Emilio Popovits Blake - Contact
Project Link: https://github.com/empobla/earthquakeMapper