Here is a weather app created with React and Vite! Inspired by this assignment. This app will provide the current temperature and other basic weather information for any city in the world.
-
Clone the project.
-
Install dependencies by running
npm install. -
Create a
.envfile in the server folder and provide a Open Weather Map API key, found here. -
In
.env, add your Open Weather Map API key in this format:API_KEY=xxx. -
In the client folder, create a
.env.localfile. In.env.local, add your local URL in this format:VITE_BASE_API_URL=http://localhost:8080. -
cdto both client and server folders (I recommend using a split screen in your terminal or opening two shell windows) and runnpm run devto start the server and launch the front end in your browser.