Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajmeese7/where-temperature
Find a location that is currently in your desired temperature range.
https://github.com/ajmeese7/where-temperature
location temperature weather
Last synced: about 1 month ago
JSON representation
Find a location that is currently in your desired temperature range.
- Host: GitHub
- URL: https://github.com/ajmeese7/where-temperature
- Owner: ajmeese7
- License: mit
- Created: 2021-01-04T19:38:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-20T13:41:33.000Z (4 months ago)
- Last Synced: 2024-11-24T17:58:36.916Z (about 2 months ago)
- Topics: location, temperature, weather
- Language: JavaScript
- Homepage: https://where-temperature.herokuapp.com/
- Size: 254 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
⛈️Where Temperature⛈️
Find a location that is currently in your desired temperature range.
## Developing
You can replicate the PostgreSQL table structure by running the following query
on your local Postgres server:```sql
CREATE TABLE data (
id SERIAL PRIMARY KEY,
weather_data text,
date TIMESTAMP default CURRENT_TIMESTAMP
);
```To start up the Express server, run `npm run devstart`. This will start it with
Nodemon, so the server will automatically restart whenever you make changes to
important files. You can view it at `localhost:5000`.To start a local Postgres server, run `psql postgresql://[user[:password]@][netloc][:port][/dbname]`,
filling in your server's information where appropriate.You should create a `.env` file with the following values assigned:
- DATABASE_URL
- OPEN_WEATHER_MAP_API_KEY
- This project uses the [Current Weather API](https://openweathermap.org/current#min) from
Open Weather Map to get the weather data.
- You can sign up for a free API key [here](https://home.openweathermap.org/api_keys).**NOTE:** The project is coded to retrieve new data if the Postgres data is older
than five minutes. However, the server's time zone may differ from yours, so it may
unnecessarily retrieve new data, or it may not gather new data when it should. I
am currently unaware of an easy solution to this, without gathering new data on
automatic intervals, so suggestions are welcome.