This project is a basic implementation of using API Integration with Vite+React framework.
This project using API from API source. for full documentation, you can access here.
https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${api_key}
Parameter | Type | Description |
---|---|---|
city |
string |
Required. City name of item to fetch |
api_key |
string |
Required. Get from the website after subscribe. You can check here (https://home.openweathermap.org/api_keys) |
Click here.
To run this project, you will need to add the following environment variables to your .env file
VITE_APP_ID
= put api key from https://home.openweathermap.org/ in here
To run tests, run the following command
npm run test
Clone the project
git clone https://github.com/Moontaz/weather-app/
Go to the project directory
cd weather-app
Install dependencies
npm install
Start the server
npm run dev