Skip to content

arshiya19/weather_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Application based on City NAmes around the world

Created a very simple weather application using Node.js and Express, with a simple frontend to display weather information for a given city.

image

Backend:

  1. Endpoints:

GET /: Serves an HTML file (index.html) as the main page. POST /: Handles form submissions to fetch weather data from the OpenWeatherMap API based on the city name input.

  1. API Integration:

Upon receiving a city name from a form, the server makes a request to the OpenWeatherMap API. The API response is parsed to extract temperature and weather description. The server sends this data back to the client as HTML.

Frontend:

  1. HTML (index.html):

Basic structure with an input field for the city name and a button to trigger the weather fetch.A container to display the weather information.

  1. CSS: An external stylesheet (app.css) linked to the HTML (path corrected).

  2. JavaScript: A function (getWeather()) to fetch weather data from the OpenWeatherMap API using fetch when the button is clicked. The fetched data is displayed dynamically on the page.

About

Created a very simple weather application using Node.js and Express, with a simple frontend to display weather information for a given city.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors