Weather-Application Using Nodejs
Hello everyone! In this tutorial, we deployed a weather application to get information about the weather using Node.js.
Hello everyone!
In this tutorial, we deployed a weather application to get information about weather using Node.js.
Along with weather description, it also provides information about temperature, pressure, wind speed, humidity and rainfall. Main functions used are forecasting and geocoding.
Link : https://weatherworld-thunderstar.herokuapp.com/
Prerequisites:
- HTML
- CSS
- Node.js
- Express
- Git
- Install Visual Studio
- Explore Heroku
Implementation:
- Install some npm packages
- npm i [email protected]
- npm i [email protected]
- npm i [email protected]
- Create an account on the “weatherstack.com” site.
- Initialize npm
- npm init
- Make npm request : npm i [email protected]
- Make google chrome extension of “JSON Formatter”
- Geocoding file
- Create an account on the “mapbox.com” site.
- Geocoding work on 2 things :
- Convert location into geographical coordinates(latitude and longitude).
- Convert geographical coordinates into location.
- Add an if-elseif-else statement for error handling for network error or wrong address.
- Add callback abstraction to export geocoding for a given address.
- Forecasting file
- Forecasting gives us information about nature, temperature, pressure, wind speed and so many other weather parameters using given data.
- Add an if-elseif-else statement for error handling for network error or wrong address.
- Add callback abstraction to export forecasting for a given address.
- Apply object shorthand and destructuring property.
- Add web framework : Express
- npm init -y
- npm i [email protected]
- Add HTML pages for home, about, help and error.
- Add CSS and Javascript pages
- Adding templates to it.
Project Files
/
Loading...
| .. | ||
| This directory is empty. | ||