Weather App build with HTML, CSS, JavaScript, Express and NodeJS.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Weather App using HTML, CSS and JavaScript for the entire frontend. As well as, NodeJS and Express for the entire server-side. For this project I’ll use 2 APIs: The first is the OpenWeatherMap API and it will handle and give the data for the weather. The second is the Unsplash API and it will deliver the picture that is going to be used as background, when requesting the weather for a city. The frontend of the application was deployed on Netlify. The backend of the application was deployed on Render.
- HTML5
- CSS
- JavaScript
- NodeJS
- Express
To get a local copy up and running follow these simple example steps.
List of prerequisites to use the application correctly.
- NodeJS
- To check if NPM is installed, run the following command in your terminal:
npm -v
- Create an account in OpenWeatherMap and Unsplash to get your API keys.
This section describes the application installation and configuration process for the frontend and backend.
- Clone the frontend repository
git clone https://github.com/ASJordi/simple-weather-app.git
- Install NPM packages
npm install
- Configure the environment variables in server folder
// .env file WEATHER_API_KEY = 'YOUR_OPENWEATHERMAP_API_KEY' UNSPLASH_API_KEY = 'YOUR_UNSPLASH_API_KEY'
- Set your API URL in the frontend
// client\public\app.js const base_url = <your_api_url>
- Run the server
npm run dev
- Run the frontend (with VSCode Live Server)
The operation of the application is very simple. It is only necessary to enter the name of the desired city. In automatic the page will show the weather forecast.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Jordi Ayala - @ASJordi
Project link: https://github.com/ASJordi/simple-weather-app