https://github.com/diegokarabin/earthquake-app
https://github.com/diegokarabin/earthquake-app
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/diegokarabin/earthquake-app
- Owner: DiegoKarabin
- Created: 2024-04-05T22:46:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-16T04:43:26.000Z (over 1 year ago)
- Last Synced: 2024-04-16T06:46:25.525Z (over 1 year ago)
- Language: Ruby
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Technical challenge from Frogmi (Earthquake App)
This app shows earthquake data from the last month, fetched from https://earthquake.usgs.gov/
> Developed by Diego Karabin
## Project structure
This project is a monorepo that contains an API made using Ruby on Rails and a frontend app made using React and Vite.
Both projects runs over docker, the backend container uses a docker service for the postgresql database.## Steps to run the project
1. Copy `.env.example` file
```bash
cp .env.example .env```
This file already has some environment variables for connect to the database inside the container, you can leave it as it is or change it as you prefer.2. Run up the docker containers
```bash
docker compose up --build
```3. Create and migrate the database
```bash
docker exec -it earthquake-app-backend-1 bin/rails db:create
docker exec -it earthquake-app-backend-1 bin/rails db:migrate
```4. Excecute the tasks that will fetch the data
```bash
docker exec -it earthquake-app-backend-1 bin/rails fetch_data
```5. Enter to `http://localhost:8080` to see the app.