Repository contains NextJS application for displaying current weather and a forecast for 5 days.
The user can specify the location in two ways:
- by typing the name of the city in the input, which is saved to
localStorage
and then available in the dropdown options, - by clicking the GET LOCATED button (only if geolocation is enabled).
![](https://private-user-images.githubusercontent.com/18627402/293505913-ef1bc988-1b4a-4e91-9e32-0795276e3af5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NjExMTQsIm5iZiI6MTcyMDc2MDgxNCwicGF0aCI6Ii8xODYyNzQwMi8yOTM1MDU5MTMtZWYxYmM5ODgtMWI0YS00ZTkxLTllMzItMDc5NTI3NmUzYWY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDA1MDY1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjMGQ2MzQxZWFkMWU1NzA1YTY2ZmJiODVhNTMyOTFkYjgzOWZhYzI2ZmEzYTlkY2M2MTEyZTM4YTk0YWZiYTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FSkC5F98kM_S4uxWPI9MtBDkhuUbFb2nP_SjVWmoeYc)
![](https://private-user-images.githubusercontent.com/18627402/293505927-439e5eeb-6344-4bc2-bbff-8833b681b0d2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NjExMTQsIm5iZiI6MTcyMDc2MDgxNCwicGF0aCI6Ii8xODYyNzQwMi8yOTM1MDU5MjctNDM5ZTVlZWItNjM0NC00YmMyLWJiZmYtODgzM2I2ODFiMGQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDA1MDY1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkZGZkYTg1ZjU0N2E3NTg3ZmQxYWRmMjgwMjg0MWYyZTZlMGZiMjNhZDRiYWJlNzUxY2E5ZjliNTAzZThmZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2odWKWr6pV6ys9Kpu4sDspTJ8wU04YJQOuDphYKKzz4)
The application uses the Open Weather API to get weather data, so first you need to add the Open Weather API key to the .env.local
file.
Then you can start the application with npm run dev
or a corresponding command if you are using a tool other than npm.
Open http:https://localhost:3000 with your browser to see the result.
To run unit tests, use npm run test
.
For end-to-end testing, you need to run the application first, and then use npm run e2e-test
or npm run e2e-test-ui
to view it in UI mode.
https://weather-forecast-drop.vercel.app/
App deployed with Vercel.
This is a Next.js project bootstrapped with create-next-app
.