This is a simple weather application that allows users to fetch weather data for a specific city.
- Vue.js: Frontend framework for building user interfaces
- Axios: HTTP client for making requests to the server
- Node.js: JavaScript runtime environment for running server-side code
- Express.js: Web application framework for Node.js used to build RESTful APIs
- Axios: HTTP client for making requests to external APIs
- dotenv: Module to load environment variables from a .env file
- CORS: Middleware for enabling Cross-Origin Resource Sharing
weather-app
│ README.md
│
└───client
│ │ // Vue.js frontend code
│ │ ...
│
└───server
│ // Node.js backend code
│ ...
-
Clone the Repository:
git clone https://github.com/your_username/weather-app.git
-
Install Dependencies:
- Navigate to the client folder and install frontend dependencies:
cd client npm install
- Navigate to the server folder and install backend dependencies:
cd ../server npm install
- Navigate to the client folder and install frontend dependencies:
-
Set Up Environment Variables:
- Create a
.env
file in the server folder and add your OpenWeatherMap API key:API_KEY=your_openweathermap_api_key
- Create a
-
Run the Application:
- Start the backend server:
npm start
- Start the frontend application:
cd ../client npm run serve
- Start the backend server:
-
Access the Application:
- Open your web browser and go to
http://localhost:8080
to access the weather application.
- Open your web browser and go to
This project is licensed under the MIT License - see the LICENSE file for details.