Find a location that is currently in your desired temperature range.
MIT License
You can replicate the PostgreSQL table structure by running the following query on your local Postgres server:
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:
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.