Coders Packet

Weather Web-App(JavaScript)

By Shruti Jukaria

In this project, we are going to build a simple and basic app using HTML,CSS JavaScript and Node.js that forecasts the weather of a city entered by you.

This Weather App is created using an Open Source API- OpenWeatherMap.

1.Installing and initialising npm and installing various dependencies.

To begin with, you need to install Node.js on your system. Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. With node ,you need to install various dependencies like express,body-parser ejs using the Command Line Interface. This is done using npm-a package manager for the JavaScript programming language. You need to install and Cinitialse npm first.

 

                                                         

                                                             

2. Creating an account and getting the API key.

We need to create an account and subscribe on OpenWeatherMap and get our own API key. That key needs to be replaced with the one used in this project. That key is used in retrieving the required information. 

3. Creating web pages using HTML and CSS.

HTML and CSS are used to create and design the web pages used for entering the information by the user. EJS are templates are used to redering the information using JavaScript.

4. Back-end(Node.js).

We need to create a JavaScript file and require the various dependencies in it. Node.js handles our application from the server side. Get requests are used to render the information and post requests are used to send the data to the server which retrieves the information and send it back to us.

                           

 

You can run your app on localhost using the command node app.js.

Download project

Reviews Report

Submitted by Shruti Jukaria (Shrutijukaria)

Download packets of source code on Coders Packet