Check the app here
This application uses socket.io to update all the clients regarding how many city weather queries are left.
A maximum of 1000 API weather calls are allowed on a daily basis in the free subscription to open weather api. The value is not reliable because the app is run for free by Heroku hence it might be restarted and the counter will restart
If you want to run this application on your computer you need to make sure you got an api key from open weather api
You can set up different ports to run your application, for example port 8080.
-
You need to edit
client/package.json
and change the value of theproxy
to your choice, for examplehttp://localhost:8080
-
You need to edit
endpoint
inside state inclient/src/App.js
to your choice, for examplehttp://localhost:8080
-
You need to add the value for the environment variable
API_KEY
for the server with an api key value from open weather api -
Make sure that
endpoint
,proxy
andPORT
(server environment variable) variables are using the same destination.
Once the setup is done you need to run from the repository root npm install
and npm run build
then you simply to npm start
and the application will run on the configured port.