Skip to content

A web app which provides current weather conditions of a location by zip code through an API

Notifications You must be signed in to change notification settings

madhur-taneja/Weather-Journal-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Journal App

An asynchronous web app that uses Web API and user data to dynamically update the UI.

Table of Contents

Getting Started

The starter code can be found in this repo provided by Udacity.

The project will be evaluated by a Udacity code reviewer according to the Weather Journal App project rubric.

Tools Required

You would require the following tools to develop and run the project:

Installation

Start by setting up the project environment. cd into the project's root folder and run the following command to install the packages mentioned in package.json:

npm install

Instructions

This project required modifying the server.js file and the website/app.js file. index.html was used for element references, and once finished with the project steps, style.css was used to style the application to customized perfection.

Extras

If interested in testing the code, tests.js can be used as a template for writing and running some basic tests for your code.

Development

  • Add a GET route that returns the projectData object in your server code Then, add a POST route that adds incoming data to projectData

  • Acquire API credentials from OpenWeatherMap website

  • After the successful retrieval of the weather data, chain another Promise that makes a POST request to add the API data, as well as data entered by the user, to your app.

  • Finally, chain another Promise that updates the UI dynamically

For details now how these functionalities have been implemented, refer the source code.

Running the App

  • Before starting the server, go to the website/app.js folder. On line 3,

     const apiKey = '&APPID=***'
    

    replace the *** with the unique apiKey that was generate for you on OpenWeatherMap.

  • Open terminal in the root directory and run the following command:

     npm run start
    
  • The server will start on http://localhost:3000/ in your browser.

References

About

A web app which provides current weather conditions of a location by zip code through an API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published